/* Starganza Box Office — public website pieces (seat diagram, price tags, Book-now popup) */

/* ---------- Seat diagram ---------- */
.sgz-diagram { display: block; width: 100%; height: auto; margin: 0 auto; }
.sgz-diagram text { font-family: "Cinzel", "Maitree", serif; }
html[lang="th"] .sgz-diagram text { font-family: "Maitree", serif; letter-spacing: 0; }

/* ---------- [starganza_price] ---------- */
.sgz-price { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .25rem .6rem; font-weight: 700; }
.sgz-price-now {
  font-size: 1.15em; color: #fff;
  background: linear-gradient(135deg, #ff2d8e, #c2187a);
  padding: .1em .55em; border-radius: 999px;
  box-shadow: 0 0 14px rgba(255, 45, 142, .55);
}
.sgz-price-reg { font-size: .78em; font-weight: 500; opacity: .65; text-decoration-color: #ff4d9f; text-decoration-thickness: 2px; }
.sgz-price-save {
  font-size: .72em; letter-spacing: .06em; text-transform: uppercase; color: #1d0f33;
  background: linear-gradient(135deg, #ffe58a, #f4c430); padding: .2em .6em; border-radius: 4px;
}

/* ---------- Book-now popup ---------- */
.sgz-pop[hidden] { display: none !important; }
.sgz-pop {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  font-family: "DM Sans", system-ui, sans-serif; color: #fff4e0;
}
html.sgz-pop-open, html.sgz-pop-open body { overflow: hidden; }
.sgz-pop-back {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(58, 24, 96, .78), rgba(10, 2, 24, .92));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: sgzPopFade .25s ease;
}
.sgz-pop-card {
  position: relative; width: 100%; max-width: 620px; max-height: calc(100vh - 32px); overflow: auto;
  padding: 2.2rem 1.6rem 1.6rem; border-radius: 22px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(232, 32, 124, .28), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(123, 61, 192, .35), transparent 55%),
    linear-gradient(180deg, #24103f, #160829);
  border: 1px solid rgba(255, 217, 102, .45);
  box-shadow: 0 0 0 1px rgba(255, 45, 142, .25), 0 30px 80px rgba(0, 0, 0, .6), 0 0 60px rgba(232, 32, 124, .25);
  animation: sgzPopIn .45s cubic-bezier(.2, 1.3, .4, 1);
}
.sgz-pop-x {
  position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255, 244, 224, .2); background: rgba(255, 255, 255, .06); color: #fff4e0;
  font-size: 26px; line-height: 1; cursor: pointer; transition: background .2s, transform .2s;
}
.sgz-pop-x:hover { background: rgba(255, 255, 255, .15); transform: rotate(90deg); }
.sgz-pop-spark { position: absolute; color: #ffd966; pointer-events: none; animation: sgzTwinkle 2.4s ease-in-out infinite; }
.sgz-pop-spark.s1 { top: 18px; left: 22px; font-size: 18px; }
.sgz-pop-spark.s2 { top: 54px; right: 70px; font-size: 12px; animation-delay: .8s; color: #ff79b3; }
.sgz-pop-spark.s3 { bottom: 120px; left: 12px; font-size: 14px; animation-delay: 1.5s; }

.sgz-pop-head { text-align: center; margin-bottom: 1.3rem; }
.sgz-pop-eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase;
  color: #1d0f33; background: linear-gradient(135deg, #ffe58a, #f4c430); padding: .35em 1em; border-radius: 999px;
}
.sgz-pop-title {
  font-family: "Cinzel", "Maitree", serif; font-weight: 700; font-size: clamp(1.6rem, 5vw, 2.3rem); line-height: 1.15;
  margin: .7rem 0 .4rem; letter-spacing: .04em;
  background: linear-gradient(90deg, #ffd966, #ff79b3 50%, #ffd966); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sgzShine 4s linear infinite;
}
.sgz-pop-sub { margin: 0 auto; max-width: 30em; font-size: .95rem; opacity: .8; line-height: 1.5; }

.sgz-pop-tiers { display: flex; flex-direction: column; gap: .8rem; }
.sgz-tier {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: .6rem 1rem; align-items: center;
  padding: 1rem 1.1rem 1rem 1.3rem; border-radius: 14px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 244, 224, .12);
  overflow: hidden; animation: sgzRise .5s ease both;
}
.sgz-tier:nth-child(2) { animation-delay: .08s; }
.sgz-tier:nth-child(3) { animation-delay: .16s; }
.sgz-tier::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--tc); box-shadow: 0 0 14px var(--tc); }
.sgz-tier.is-top { border-color: rgba(255, 217, 102, .55); background: linear-gradient(90deg, rgba(244, 196, 48, .12), rgba(255, 255, 255, .04)); }
.sgz-tier-name { font-family: "Cinzel", "Maitree", serif; font-weight: 700; font-size: 1.25rem; letter-spacing: .03em; color: #fff; }
.sgz-tier-flag {
  display: inline-block; vertical-align: middle; margin-left: .3rem; font-family: "DM Sans", sans-serif;
  font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: #1d0f33; background: #ffd966; padding: .2em .6em; border-radius: 4px;
}
.sgz-tier-desc { margin: .3rem 0 0; font-size: .88rem; line-height: 1.45; opacity: .82; }
.sgz-tier-perk { display: inline-block; color: #ffd966; font-weight: 600; opacity: 1; }
.sgz-tier-price { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; text-align: right; }
.sgz-tier-badge {
  display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
  padding: .45em .5em .45em .9em; border-radius: 999px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; color: #fff;
  background: linear-gradient(135deg, #ff2d8e, #c2187a);
  box-shadow: 0 4px 18px rgba(255, 45, 142, .45), inset 0 1px 0 rgba(255, 255, 255, .3);
  animation: sgzPulse 2.2s ease-in-out infinite;
}
.sgz-tier-badge b { font-size: 1.55rem; line-height: 1; color: #ffe066; text-shadow: 0 0 12px rgba(255, 224, 102, .6); }
.sgz-tier-badge i { font-style: normal; color: #ffe066; font-size: 1rem; }
.sgz-tier-badge--plain { animation: none; padding: .45em .9em; }
.sgz-tier-was { font-size: .8rem; opacity: .7; }
.sgz-tier-was s { text-decoration-color: #ff4d9f; text-decoration-thickness: 2px; font-weight: 600; }
.sgz-tier-save {
  font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: #1d0f33; background: linear-gradient(135deg, #ffe58a, #f4c430); padding: .25em .65em; border-radius: 4px;
}

.sgz-pop-cta {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: .6rem;
  margin-top: 1.4rem; padding: 1.05rem 1.5rem; border-radius: 999px;
  font-weight: 800; font-size: 1.15rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: #fff !important;
  background: linear-gradient(135deg, #ff2d8e 0%, #b0167a 45%, #7b3dc0 100%);
  box-shadow: 0 10px 30px rgba(255, 45, 142, .5), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .15s, box-shadow .2s;
}
.sgz-pop-cta svg { width: 22px; height: 22px; transition: transform .2s; }
.sgz-pop-cta:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 14px 40px rgba(255, 45, 142, .65), inset 0 1px 0 rgba(255, 255, 255, .35); }
.sgz-pop-cta:hover svg { transform: translateX(4px); }
.sgz-pop-cta::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg); animation: sgzSweep 2.8s ease-in-out infinite;
}
.sgz-pop-cta:focus-visible, .sgz-pop-x:focus-visible { outline: 3px solid #ffd966; outline-offset: 3px; }
.sgz-pop-note { margin: .8rem 0 0; text-align: center; font-size: .78rem; opacity: .6; }

/* ---- Booking buttons: LINE (main) + Megatix (white, secondary) ---- */
.sgz-pop-actions { display: flex; flex-direction: column; gap: .7rem; margin-top: 1.4rem; }
.sgz-pop-actions .sgz-pop-cta { margin-top: 0; }
.sgz-pop-cta--line {
  background: linear-gradient(135deg, #2fe07a 0%, #06c755 55%, #04a346 100%);
  box-shadow: 0 10px 30px rgba(6, 199, 85, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.sgz-pop-cta--line:hover { box-shadow: 0 14px 40px rgba(6, 199, 85, .6), inset 0 1px 0 rgba(255, 255, 255, .35); }
.sgz-pop-cta .sgz-line-ic { width: 28px; height: 28px; }
.sgz-pop-cta--megatix {
  background: #fff; color: #2c1a47 !important; box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  font-size: .95rem; padding: .85rem 1.5rem; letter-spacing: .08em;
}
.sgz-pop-cta--megatix::after { display: none; }
.sgz-pop-cta--megatix:hover { background: #f4eefc; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }

/* ---- LINE QR (welcome popup only) ---- */
.sgz-pop-line { display: none; align-items: center; gap: 1rem; margin-top: 1.2rem; padding: .9rem; border-radius: 16px; background: rgba(6, 199, 85, .1); border: 1px solid rgba(6, 199, 85, .45); }
.sgz-pop[data-mode="welcome"] .sgz-pop-line { display: flex; }
.sgz-pop-qr { flex: none; width: 132px; height: 132px; border-radius: 12px; background: #fff; padding: 6px; box-shadow: 0 0 0 3px #06c755, 0 6px 20px rgba(0, 0, 0, .35); }
.sgz-pop-line-text { display: flex; flex-direction: column; gap: .25rem; font-size: .88rem; line-height: 1.45; opacity: .9; }
.sgz-pop-line-text b { font-size: 1.05rem; color: #fff; }
.sgz-pop-line-id { font-weight: 800; color: #3ddc84; font-size: 1.05rem; letter-spacing: .02em; }

/* ---- Layout: two columns on desktop, 90% × 90% scrolling panel on phones ---- */
.sgz-pop-side .sgz-pop-line { flex-direction: column; text-align: center; }
.sgz-pop-side .sgz-pop-line-text { align-items: center; }

@media (min-width: 900px) {
  .sgz-pop-card {
    max-width: 1040px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, 1fr);
    gap: 2rem; align-items: stretch; padding: 2.4rem 2.2rem 2.2rem;
  }
  .sgz-pop-side {
    display: flex; flex-direction: column; justify-content: center;
    padding-left: 2rem; border-left: 1px solid rgba(255, 217, 102, .22);
  }
  .sgz-pop-side .sgz-pop-line { margin-top: 0; padding: 1.1rem; }
  .sgz-pop-side .sgz-pop-qr { width: 168px; height: 168px; }
  .sgz-pop-side .sgz-pop-actions { margin-top: 1.2rem; }
  .sgz-pop[data-mode="book"] .sgz-pop-side .sgz-pop-actions { margin-top: 0; }
}

@media (max-width: 767px) {
  .sgz-pop { padding: 0; align-items: center; }
  .sgz-pop-card {
    width: 90vw; height: 90vh; max-width: none; max-height: 90vh;
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; border-radius: 18px;
  }
  /* keep ✕ reachable while the panel scrolls */
  .sgz-pop-x { position: fixed; top: calc(5vh + 10px); right: calc(5vw + 10px); z-index: 3; background: rgba(22, 8, 41, .85); }
}

html[lang="th"] .sgz-pop-title, html[lang="th"] .sgz-tier-name { font-family: "Maitree", serif; letter-spacing: 0; }
html[lang="th"] .sgz-pop-eyebrow, html[lang="th"] .sgz-pop-cta { letter-spacing: .04em; }

@media (max-width: 560px) {
  .sgz-pop-card { padding: 2rem 1rem 1.2rem; }
  .sgz-tier { grid-template-columns: 1fr; padding: .9rem .9rem .9rem 1.1rem; }
  .sgz-tier-price { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; text-align: left; }
  .sgz-tier-badge b { font-size: 1.35rem; }
  .sgz-pop-line { gap: .8rem; padding: .7rem; }
  .sgz-pop-qr { width: 104px; height: 104px; }
}

@keyframes sgzPopFade { from { opacity: 0; } }
@keyframes sgzPopIn { from { opacity: 0; transform: translateY(24px) scale(.94); } }
@keyframes sgzRise { from { opacity: 0; transform: translateY(10px); } }
@keyframes sgzShine { to { background-position: 200% center; } }
@keyframes sgzSweep { 0%, 60% { left: -40%; } 100% { left: 130%; } }
@keyframes sgzPulse { 0%, 100% { box-shadow: 0 4px 18px rgba(255, 45, 142, .45), inset 0 1px 0 rgba(255, 255, 255, .3); } 50% { box-shadow: 0 4px 28px rgba(255, 45, 142, .8), inset 0 1px 0 rgba(255, 255, 255, .3); } }
@keyframes sgzTwinkle { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

@media (prefers-reduced-motion: reduce) {
  .sgz-pop-card, .sgz-pop-back, .sgz-tier, .sgz-tier-badge, .sgz-pop-title, .sgz-pop-cta::after, .sgz-pop-spark { animation: none !important; }
}
