/* Dedicated Client Cloud Gallery Page */
.gallery-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-white);
  box-shadow: 0 2px 14px rgba(49, 36, 24, 0.08);
}

.gallery-topbar-inner {
  width: 80%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.gallery-brand {
  font-family: var(--heading-font);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
}

.gallery-brand:hover {
  text-decoration: none;
}

.gallery-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.gallery-client-badge {
  padding: 6px 14px;
  border-radius: 999px;
  background-color: #f8f1e5;
  border: 1px solid #eadcc5;
  color: var(--text-dark);
  font-size: 0.85rem;
  font-weight: 600;
}

.gallery-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 5px;
  text-decoration: none;
}

.gallery-back-btn:hover {
  background-color: var(--text-dark);
  color: var(--bg-white);
  text-decoration: none;
}

.gallery-page-container {
  width: 80%;
  max-width: 1280px;
  margin: 48px auto 96px;
  min-height: 68vh;
}

.gallery-hero-header {
  text-align: center;
  margin-bottom: 36px;
}

.gallery-eyebrow {
  margin: 0 0 8px;
  color: #a87515;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.gallery-hero-header h1 {
  text-transform: uppercase;
  margin-bottom: 10px;
}

.gallery-subtitle {
  max-width: 640px;
  margin: 0 auto;
  color: #6f655a;
}

/* Fallback Email Lookup Card */
.gallery-lookup-card {
  max-width: 560px;
  margin: 0 auto 32px;
  padding: 28px 32px;
  border-radius: 10px;
  background-color: var(--bg-white);
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
  text-align: center;
}

.gallery-lookup-card h3 {
  text-transform: uppercase;
  margin-bottom: 6px;
}

.gallery-lookup-card > p {
  margin: 0 0 18px;
  font-size: 0.95rem;
  color: #6f655a;
}

.gallery-lookup-form {
  display: flex;
  gap: 10px;
}

.gallery-lookup-form input {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid var(--text-dark);
  border-radius: 5px;
  font: 400 0.95rem var(--body-font);
}

.gallery-lookup-form button {
  background-color: var(--text-dark);
  color: var(--bg-white);
  border-radius: 5px;
  white-space: nowrap;
}

.gallery-lookup-form button:hover {
  background-color: var(--bg-white);
  color: var(--text-dark);
}

/* Active Gallery Header & Controls */
.gallery-controls {
  padding: 24px 28px;
  margin-bottom: 28px;
  border-radius: 10px;
  background-color: var(--bg-white);
  box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 10px;
}

.gallery-meta-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid #eee7dc;
}

.gallery-meta-bar h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
}

.gallery-meta-text {
  margin: 6px 0 0;
  color: #6f655a;
  font-size: 0.92rem;
}

.gallery-retention-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background-color: #f4faf6;
  border: 1px solid #cce5d5;
  color: #1e4d31;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.gallery-retention-pill.is-expiring-soon {
  background-color: #fff9ec;
  border-color: #eed8a6;
  color: #8a5b0c;
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 16px;
}

.gallery-album-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.album-pill {
  padding: 7px 14px;
  border: 1.5px solid var(--text-dark);
  border-radius: 5px;
  background-color: var(--bg-white);
  color: var(--text-dark);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.album-pill.is-active {
  background-color: var(--text-dark);
  color: var(--bg-white);
}

.gallery-filter-tabs {
  display: flex;
  gap: 8px;
}

.filter-tab {
  padding: 7px 16px;
  border: 1.5px solid #d8c298;
  border-radius: 5px;
  background-color: var(--bg-white);
  color: var(--text-dark);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-tab.is-active {
  background-color: #e1a932;
  border-color: #e1a932;
  color: var(--text-dark);
}

/* Media Grid */
.gallery-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.media-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--bg-white);
  box-shadow: rgba(0, 0, 0, 0.18) 0px 3px 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.media-card:hover {
  transform: translateY(-3px);
  box-shadow: rgba(0, 0, 0, 0.26) 0px 8px 20px;
}

.media-thumb-btn {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  background-color: #1c150e;
  cursor: pointer;
  overflow: hidden;
}

.media-thumb-btn img,
.media-thumb-btn video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-video-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(28, 21, 14, 0.78);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
}

.media-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
}

.media-filename {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-download-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--text-dark);
  border-radius: 5px;
  color: var(--text-dark);
  text-decoration: none;
}

.media-download-link:hover {
  background-color: var(--text-dark);
  color: var(--bg-white);
  text-decoration: none;
}

/* Fullscreen Lightbox */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 15, 10, 0.92);
  backdrop-filter: blur(4px);
}

.lightbox-stage {
  max-width: min(92vw, 1080px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-media-wrapper img,
.lightbox-media-wrapper video {
  max-width: 100%;
  max-height: 76vh;
  border-radius: 8px;
  display: block;
}

.lightbox-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
}

.lightbox-download-btn {
  background-color: #e1a932;
  border-color: #e1a932;
  color: #312418;
  border-radius: 5px;
  font-weight: 700;
  text-decoration: none;
}

.lightbox-download-btn:hover {
  background-color: #d39a21;
  text-decoration: none;
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.lightbox-close {
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  font-size: 2rem;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  font-size: 1.2rem;
}

.lightbox-nav.prev {
  left: 18px;
}

.lightbox-nav.next {
  right: 18px;
}

@media only screen and (max-width: 840px) {
  .gallery-topbar-inner,
  .gallery-page-container {
    width: 90%;
  }

  .gallery-meta-bar {
    flex-direction: column;
  }

  .gallery-lookup-form {
    flex-direction: column;
  }
}