/* v1.6 — stable, lightbox-contained, neat pagination */

.escort-media-gallery {
  --emg-gap: 16px;
  --emg-radius: 12px;
  --emg-surface: rgba(255,255,255,0.06);
  --emg-surface-2: rgba(255,255,255,0.08);
  --emg-border: rgba(255,255,255,0.12);
  --emg-text: #fff;
  color: var(--emg-text);
}

/* Featured */
.emg-featured {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: var(--emg-gap);
  margin-bottom: 1rem;
}
.emg-featured__stage {
  min-height: 320px;
  background: var(--emg-surface);
  border: 1px solid var(--emg-border);
  border-radius: var(--emg-radius);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.emg-featured__placeholder {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.06), rgba(255,255,255,0.06) 10px, rgba(255,255,255,0.03) 10px, rgba(255,255,255,0.03) 20px);
}
.emg-featured__img {
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.emg-featured__nav {
  background: var(--emg-surface-2);
  border: 1px solid var(--emg-border);
  color: var(--emg-text);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
}
.emg-featured__nav:hover { background: rgba(255,255,255,0.12); }

/* Tabs */
.escort-media-gallery .emg-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.escort-media-gallery .emg-tab {
  appearance: none;
  background: transparent;         /* let theme fill this in */
  border: 1px solid currentColor;  /* neutral: uses text color */
  padding: .5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: .875rem;
  font-family: inherit;            /* use theme font */
  color: inherit;                  /* use theme text color */
  transition: background .2s ease, color .2s ease;
}

.escort-media-gallery .emg-tab.is-active {
  background: currentColor; 
}

/* Grid */
.emg-grid {
  display: grid;
  gap: var(--emg-gap);
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 720px) { .emg-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .emg-grid { grid-template-columns: 1fr; } }

.emg-item { list-style: none; }
.emg-thumb {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  background: #111;
  /* border: 1px solid var(--emg-border); */
}
/* --- Video thumbs: solid background + centered play badge --- */
.emg-thumb--video,
.emg-thumb--video-fallback {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;      /* uniform grid */
  background: #000;         /* solid black backdrop */
  object-fit: cover;
  border-radius: 8px;
}

.emg-thumb--video::after,
.emg-thumb--video-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0,0,0,.4);
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}

.emg-thumb--video::before,
.emg-thumb--video-fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  left: calc(50% - 8px);
  top: calc(50% - 12px);
  width: 0;
  height: 0;
  border-left: 24px solid #fff;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
}



/* Lightbox (contain, scroll-safe) */
.escort-lightbox-open { overflow: hidden; }
#escort-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}
#escort-lightbox.is-active { display: block; }

.escort-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
}

.escort-lightbox__content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 96vw;
  width: min(1100px, 96vw);
  max-height: 96vh;        /* <-- contain vertically */
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr); /* header + flexible content */
  overflow: hidden;
}

.escort-lightbox__close {
  justify-self: end;
  margin: 6px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #444;
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
}

.escort-lightbox__inner {
  overflow: hidden;          /* allow scroll if extremely tall */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.escort-lightbox__media {
  max-width: 100%;
  max-height: 92vh;        /* belt + braces */
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Hide inactive sections */
.emg-section.is-hidden { display: none; }

/* Basic tab affordance */
.emg-tabs { display:flex; gap:.5rem; margin:.75rem 0 1rem; }
.emg-tabs br { display: none !important; }
.emg-tab { border:1px solid rgba(255,255,255,.25); background:transparent; color:inherit; padding:.4rem .75rem; border-radius:8px; cursor:pointer; }
.emg-tab.is-active { background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.4); }

/* Make thumbs consistent */
.emg-grid { list-style:none; display:grid; grid-template-columns:repeat(3, 1fr); gap:.5rem; padding:0; margin:0; }
.emg-thumb, .emg-thumb--video { width:100%; height:100%; aspect-ratio:1/1; object-fit:cover; display:block; border-radius:8px; }
.emg-thumb--video-fallback { background:rgba(0,0,0,.25); position:relative; }
.emg-thumb--video-fallback::after { content:"▶"; position:absolute; inset:auto 0 0 0; margin:auto; top:50%; transform:translateY(-50%); text-align:center; font-size:28px; color:#fff; }

/* --- Plugin: gallery pagination STRUCTURE --- */
.escort-media-gallery .emg-pagination {
  width: 100%;
  margin-top: 1rem;
  display: flex;              /* centers the inner list */
  justify-content: center;
  position: relative;         /* keep it in normal flow (no overlap) */
}

.escort-media-gallery .emg-pagination .emg-pg {
    list-style: none;
    margin: 0;
    padding-bottom: 0;
    padding-top: 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    position: static;
    
}

.escort-media-gallery .emg-pagination .emg-pg__item {
  display: inline-block;
}

/* Dots get a box to click; visuals come from the theme */
.escort-media-gallery .emg-pagination .emg-pg__item > a,
.escort-media-gallery .emg-pagination .emg-pg__item > span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;

  /* accessibility: hide numeric label but keep it for screen readers */
  color: transparent;
  text-indent: -9999px;
  overflow: hidden;
  line-height: 0;
  padding: 0;
  margin: 0;
}

#escort-featured {
  cursor:pointer;
}