/* Art Antalya v2.0.8 — compact owner photo + click-to-enlarge viewer. */

/* Keep the artwork dominant. The owner's photo now supports the text instead of competing with it. */
.story-popup .series-lightbox-shell > figure.has-owner-story {
  grid-template-columns: 52px minmax(360px, 1.34fr) minmax(330px, .62fr) 52px !important;
  gap: clamp(14px, 1.55vw, 26px) !important;
}

.story-popup .art-owner-story {
  align-self: center !important;
  display: grid !important;
  grid-template-columns: 94px minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  gap: 0 17px !important;
  min-width: 0;
  max-height: min(76%, 500px) !important;
  padding: clamp(18px, 1.65vw, 24px) !important;
  overflow: auto !important;
  border-radius: 22px !important;
  background: rgba(249,245,230,.94) !important;
}

.story-popup .art-owner-story-photo {
  position: relative;
  align-self: start;
  width: 94px !important;
  height: 94px !important;
  min-height: 0 !important;
  margin: 0 !important;
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid rgba(255,255,255,.82) !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.62) !important;
  box-shadow: 0 8px 22px rgba(5,25,24,.18);
  outline: none;
}

.story-popup .art-owner-story-photo:hover,
.story-popup .art-owner-story-photo:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 11px 28px rgba(5,25,24,.24);
}

.story-popup .art-owner-story-photo:focus-visible {
  outline: 2px solid var(--popup-accent);
  outline-offset: 3px;
}

.story-popup .art-owner-story-photo::after {
  content: "" !important;
  position: absolute !important;
  right: 6px !important;
  bottom: 6px !important;
  left: auto !important;
  width: 27px !important;
  height: 27px !important;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 50% !important;
  background-color: rgba(7,34,32,.78) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff9e8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m16 16 4 4M11 8v6M8 11h6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 15px 15px !important;
  color: transparent !important;
  font-size: 0 !important;
  letter-spacing: 0 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.22);
  pointer-events: none;
}

.story-popup .art-owner-story-photo img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  object-fit: cover !important;
  transition: transform .28s ease;
}
.story-popup .art-owner-story-photo:hover img { transform: scale(1.035); }
.story-popup .art-owner-story[data-owner-story="moon-flowers"] .art-owner-story-photo img { object-position: 47% 36% !important; }
.story-popup .art-owner-story[data-owner-story="to-the-moon"] .art-owner-story-photo img { object-position: 50% 24% !important; }

.story-popup .art-owner-story-copy {
  min-width: 0;
  align-content: start;
  gap: 7px !important;
  padding: 0 !important;
}
.story-popup .art-owner-story-copy small {
  font-size: 6.5px !important;
  line-height: 1.2 !important;
}
.story-popup .art-owner-story-copy h3 {
  font-size: clamp(23px, 1.65vw, 31px) !important;
  line-height: 1.02 !important;
}
.story-popup .art-owner-story-copy strong {
  font-size: 8.5px !important;
  line-height: 1.42 !important;
}
.story-popup .art-owner-story-copy p {
  margin-top: 4px !important;
  font-size: clamp(11.5px, .83vw, 14px) !important;
  line-height: 1.58 !important;
}

/* Full owner-photo viewer opened from the small thumbnail. */
.art-owner-photo-viewer {
  z-index: 260;
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 44px);
  background: rgba(3,16,17,.88);
  backdrop-filter: blur(13px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.art-owner-photo-viewer.is-open {
  opacity: 1;
  visibility: visible;
}
.art-owner-photo-viewer__stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(940px, 94vw);
  max-height: 91svh;
}
.art-owner-photo-viewer__image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 86svh;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(0,0,0,.48);
}
.art-owner-photo-viewer__close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.66);
  border-radius: 50%;
  cursor: pointer;
  background: rgba(8,31,30,.76);
  color: #fff9e8;
  box-shadow: 0 7px 22px rgba(0,0,0,.25);
  backdrop-filter: blur(9px);
  font: 400 26px/1 Arial, sans-serif;
}
.art-owner-photo-viewer__close:hover,
.art-owner-photo-viewer__close:focus-visible {
  background: rgba(8,31,30,.94);
  outline: 2px solid rgba(255,249,232,.82);
  outline-offset: 2px;
}
.art-owner-photo-viewer__caption {
  position: absolute;
  left: 50%;
  bottom: 13px;
  transform: translateX(-50%);
  max-width: calc(100% - 40px);
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 999px;
  background: rgba(6,29,28,.70);
  color: #fff9e8;
  backdrop-filter: blur(9px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font: 750 8px/1.2 Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 1120px) {
  .story-popup .series-lightbox-shell > figure.has-owner-story {
    grid-template-columns: 40px minmax(0, 1fr) 40px !important;
    grid-template-rows: minmax(420px, 1fr) auto !important;
  }
  .story-popup .series-lightbox-shell > figure.has-owner-story > .art-owner-story {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: min(720px, calc(100% - 24px)) !important;
    grid-template-columns: 84px minmax(0, 1fr) !important;
    max-height: none !important;
    padding: 18px 20px !important;
  }
  .story-popup .art-owner-story-photo {
    width: 84px !important;
    height: 84px !important;
    border-right: 1px solid rgba(255,255,255,.82) !important;
    border-bottom: 1px solid rgba(255,255,255,.82) !important;
  }
}

@media (max-width: 760px) {
  .story-popup .series-lightbox-shell > figure.has-owner-story > .art-owner-story {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    width: calc(100% - 16px) !important;
    gap: 0 13px !important;
    padding: 15px !important;
    border-radius: 17px !important;
  }
  .story-popup .art-owner-story-photo {
    width: 72px !important;
    height: 72px !important;
    max-height: 72px !important;
    border-radius: 14px !important;
  }
  .story-popup .art-owner-story-photo::after {
    width: 23px !important;
    height: 23px !important;
    right: 4px !important;
    bottom: 4px !important;
    background-size: 13px 13px !important;
  }
  .story-popup .art-owner-story-copy h3 { font-size: 22px !important; }
  .story-popup .art-owner-story-copy strong { font-size: 7.8px !important; }
  .story-popup .art-owner-story-copy p {
    font-size: 12px !important;
    line-height: 1.52 !important;
  }
  .art-owner-photo-viewer { padding: 10px; }
  .art-owner-photo-viewer__stage { width: 100%; }
  .art-owner-photo-viewer__image {
    max-width: 100%;
    max-height: 88svh;
    border-radius: 13px;
  }
  .art-owner-photo-viewer__close {
    top: 9px;
    right: 9px;
    width: 40px;
    height: 40px;
    font-size: 23px;
  }
  .art-owner-photo-viewer__caption {
    bottom: 10px;
    max-width: calc(100% - 24px);
    font-size: 6.5px;
  }
}

@media (max-width: 430px) {
  .story-popup .series-lightbox-shell > figure.has-owner-story > .art-owner-story {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    gap: 0 11px !important;
    padding: 13px !important;
  }
  .story-popup .art-owner-story-photo {
    width: 64px !important;
    height: 64px !important;
    max-height: 64px !important;
  }
  .story-popup .art-owner-story-copy h3 { font-size: 20px !important; }
  .story-popup .art-owner-story-copy p { font-size: 11.5px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .story-popup .art-owner-story-photo img,
  .art-owner-photo-viewer { transition: none !important; }
}

/* v2.0.10 — artwork must always stay inside the lightbox stage. */
.story-popup .series-lightbox-shell > figure {
  min-height: 0 !important;
  overflow: hidden !important;
}
.story-popup .series-lightbox-art,
.story-popup .series-lightbox-frame {
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: 100% !important;
}
.story-popup .series-lightbox-frame {
  display: grid !important;
  place-items: center !important;
}
.story-popup .series-lightbox-frame img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: min(100%, 76vw) !important;
  max-height: min(64svh, 720px) !important;
  object-fit: contain !important;
}

/* v2.0.10 — elegant scrollbar shared by story/owner cards. */
.story-popup .art-owner-story,
.story-popup .art-story-detail {
  scrollbar-width: thin;
  scrollbar-color: rgba(186,139,49,.78) rgba(16,61,58,.08);
}
.story-popup .art-owner-story::-webkit-scrollbar,
.story-popup .art-story-detail::-webkit-scrollbar { width: 7px; }
.story-popup .art-owner-story::-webkit-scrollbar-track,
.story-popup .art-story-detail::-webkit-scrollbar-track {
  background: rgba(16,61,58,.07);
  border-radius: 999px;
  margin-block: 10px;
}
.story-popup .art-owner-story::-webkit-scrollbar-thumb,
.story-popup .art-story-detail::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(207,166,71,.95), rgba(16,78,73,.82));
  border: 2px solid rgba(249,245,230,.88);
  border-radius: 999px;
}
.story-popup .art-owner-story::-webkit-scrollbar-thumb:hover,
.story-popup .art-story-detail::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(222,181,82,1), rgba(11,64,61,.96));
}

/* Published artwork story — only rendered after explicit artist approval in admin. */
.story-popup-happiness-story .series-lightbox-shell > figure.has-art-story-panel {
  grid-template-columns: 52px minmax(440px, 1.28fr) minmax(330px, .72fr) 52px !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: clamp(14px, 1.5vw, 28px) !important;
  padding-inline: clamp(10px, 1.8vw, 30px) !important;
  overflow: hidden !important;
}
.story-popup-happiness-story .series-lightbox-shell > figure.has-art-story-panel > .series-lightbox-prev { grid-column: 1 !important; grid-row: 1 !important; }
.story-popup-happiness-story .series-lightbox-shell > figure.has-art-story-panel > .series-lightbox-art { grid-column: 2 !important; grid-row: 1 !important; min-width: 0; min-height: 0; }
.story-popup-happiness-story .series-lightbox-shell > figure.has-art-story-panel > .art-story-detail { grid-column: 3 !important; grid-row: 1 !important; }
.story-popup-happiness-story .series-lightbox-shell > figure.has-art-story-panel > .series-lightbox-next { grid-column: 4 !important; grid-row: 1 !important; }
.story-popup-happiness-story .series-lightbox-shell > figure.has-art-story-panel .series-lightbox-frame img {
  max-width: 100% !important;
  max-height: min(63svh, 700px) !important;
}
.art-story-detail {
  z-index: 4;
  align-self: center;
  width: 100%;
  max-height: min(69svh, 630px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 24px;
  padding: clamp(22px, 2vw, 32px);
  background: rgba(249,245,230,.94);
  color: #123f3c;
  box-shadow: 0 22px 65px rgba(6,29,28,.20);
  backdrop-filter: blur(18px);
}
.art-story-detail__eyebrow,
.art-story-detail__chapter-note {
  display: block;
  color: #b8872f;
  font: 800 8px/1.35 Arial,sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.art-story-detail h3 { margin: 12px 0 7px; font: 500 clamp(30px,2.4vw,46px)/1.02 Georgia,serif; color:#103f3b; }
.art-story-detail__lead { display:block; margin: 0 0 20px; color:#526b66; font: 650 12px/1.55 Arial,sans-serif; }
.art-story-detail__body p { margin: 0 0 15px; font: 400 clamp(15px,1.05vw,18px)/1.75 Georgia,serif; color:#173f3c; }
.art-story-detail__closing { margin-top:22px !important; padding:17px 19px; border-left:2px solid #c89434; background:rgba(255,255,255,.44); font-style:italic !important; }
.art-story-detail__chapter-note { margin-top:22px; padding-top:16px; border-top:1px solid rgba(16,63,59,.13); }

@media (max-width: 1120px) {
  .story-popup-happiness-story .series-lightbox-shell > figure.has-art-story-panel {
    grid-template-columns: 42px minmax(0,1fr) 42px !important;
    grid-template-rows: minmax(380px,1fr) auto !important;
    overflow: auto !important;
  }
  .story-popup-happiness-story .series-lightbox-shell > figure.has-art-story-panel > .art-story-detail {
    grid-column:1 / -1 !important; grid-row:2 !important;
    width:min(760px,calc(100% - 20px)); max-height:none; margin:0 auto 18px;
  }
  .story-popup .series-lightbox-frame img { max-height:min(56svh,620px) !important; }
}
@media (max-width: 760px) {
  .story-popup .series-lightbox-frame img { max-width:100% !important; max-height:52svh !important; }
  .art-story-detail { border-radius:18px; padding:18px; }
  .art-story-detail h3 { font-size:30px; }
  .art-story-detail__body p { font-size:15px; line-height:1.65; }
}
