/* assets/css/profile-gallery.css */

/* Profile gallery card on the model page */
.vc-profile__gallery-card {
  margin-top: 1.5rem;
}

.vc-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}

.vc-gallery-thumb {
  position: relative;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.vc-gallery-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.vc-gallery-thumb__label {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}

.vc-gallery-thumb__date {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

.vc-gallery-thumb:hover,
.vc-gallery-thumb:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  opacity: 0.95;
}

/* -------------------------------------------------
   Gallery modal
-------------------------------------------------- */

.vc-gallery-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  font-family: inherit;
}

.vc-gallery-modal--open {
  display: block;
}

.vc-gallery-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.vc-gallery-modal__dialog {
  position: fixed;
  inset: 5%;
  max-width: 1100px;
  margin: auto;
  background: #111827; /* slate-900 style */
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 768px) {
  .vc-gallery-modal__dialog {
    inset: 8%;
  }
}

.vc-gallery-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: #f9fafb;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  font-size: 1rem;
}

.vc-gallery-modal__img-wrap {
  position: relative;
  background: #000;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vc-gallery-modal__img-wrap img {
  max-width: 100%;
  max-height: 75vh;
  display: block;
}

.vc-gallery-modal__username {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  font-size: 0.8rem;
}

.vc-gallery-modal__meta {
  padding: 0.75rem 1rem 0.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  color: #e5e7eb;
}

.vc-gallery-modal__meta h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
}

.vc-gallery-modal__meta p {
  margin: 0;
  font-size: 0.8rem;
  color: #9ca3af;
}

.vc-gallery-modal__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
}

.vc-gallery-modal__actions button,
.vc-gallery-modal__actions a {
  border-radius: 999px;
  border: 0;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  background: #1f2937;
  color: #e5e7eb;
  transition: background 0.15s ease, transform 0.1s ease;
}

.vc-gallery-modal__actions button:hover,
.vc-gallery-modal__actions a:hover {
  background: #4b5563;
  transform: translateY(-1px);
}

.vc-gallery-modal__actions a#vcGalleryDownload {
  background: #10b981;
  color: #022c22;
}

.vc-gallery-modal__actions a#vcGalleryDownload:hover {
  background: #34d399;
}

/* When a modal is open, avoid scrolling the body underneath */
.vc-modal-open {
  overflow: hidden;
}
