/* ═══════════════════════════════════════════════════════════════════════
   ticket-modal.css — LỚP PHỦ MUA VÉ (iframe suoitien.vn) phủ kín màn hình

   Đi cùng js/ticket-modal.js. Nạp bởi CẢ 3 trang (index.htm ·
   combo/index.html · map.html) — mọi trang có nút CTA "Mua vé".

   z-index 10060: phải TRÊN tất cả chrome hiện có — 10000–10009 là của
   floorplan.css (#fp-fabs, #fp-overlay, #viewer.fp-vrsplit, #fp-split-ctl,
   #st-lang, #st-menu), 10010–10012 của trang combo + #fp-toast, 10050 là
   khung trang chào (#st-welcome-frame). Thấp hơn thì trang mua vé bị chính
   chrome của trang đè lên.
   ═══════════════════════════════════════════════════════════════════════ */

#st-ticket {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  flex-direction: column;
  background: #0c5a30;
  /* `.vis` bật display, `.on` chạy hiệu ứng — transition KHÔNG chạy từ
     display:none (cùng lệ hộp thoại góp ý, js/feedback.css). */
  opacity: 0;
  transition: opacity .18s ease;
  font-family: "DVN - Gustavo", "DVN Gustavo", 'Be Vietnam Pro', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

#st-ticket[hidden] {
  display: none;
}

#st-ticket.on {
  opacity: 1;
}

/* ── Thanh đầu: tên + lối mở tab mới + nút đóng ────────────────────────
   Nền xanh thương hiệu để tách rõ "chrome của mình" khỏi trang của
   suoitien.vn bên dưới — khách luôn biết mình đang xem trang của ai và
   đường ra nằm ở đâu. */
.st-tk-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: calc(52px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 8px 0 16px;
  color: #fff;
  /* `position: relative` + z-index để BÓNG ĐỔ ăn lên trang trong iframe: iframe
     là phần tử ĐỨNG SAU trong DOM nên mặc định nó vẽ đè lên bóng, và trang bán
     vé cũng mở đầu bằng một dải xanh — không có đường phân cách thì hai dải
     xanh dính thành một mảng, khách không đọc ra đâu là chrome bấm được. */
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}

.st-tk-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
  overflow: hidden;
}

.st-tk-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.st-tk-host {
  font-size: 11px;
  font-weight: 500;
  opacity: .72;
}

.st-tk-new {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .15s ease;
}

/* Dáng nút lấy từ .st-x (js/floorplan.css) — MỘT dáng × cho cả site. Ở đây chỉ
   THU NHỎ cho vừa thanh đầu (cao 52px / 46px ở khổ hẹp, không chứa nổi 46px). */
.st-tk-x {
  width: 36px;
  height: 36px;
}

.st-tk-x svg {
  width: 17px;
  height: 17px;
}

.st-tk-new:hover {
  background: rgba(255, 255, 255, .3);
}

.st-tk-new:focus-visible,
.st-tk-x:focus-visible {
  outline: 3px solid #ffc02e;
  outline-offset: 2px;
}

/* ── Khung trang mua vé ────────────────────────────────────────────────
   Nền TRẮNG (không phải xanh) để lúc iframe còn trống không loé một mảng
   xanh rồi mới sang nền trắng của trang nguồn. */
.st-tk-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #fff;
}

#st-ticket iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.st-tk-load {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
}

.st-tk-load[hidden] {
  display: none;
}

.st-tk-spin {
  width: 30px;
  height: 30px;
  border: 3px solid #d7e6dc;
  border-top-color: #0c5a30;
  border-radius: 50%;
  animation: st-tk-spin .8s linear infinite;
}

@keyframes st-tk-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Điện thoại: thanh đầu thấp lại, bỏ dòng tên miền ─────────────────── */
@media (max-width: 640px) {
  .st-tk-head {
    height: calc(46px + env(safe-area-inset-top, 0px));
    padding-left: 12px;
  }

  .st-tk-name {
    font-size: 14px;
  }

  .st-tk-host {
    display: none;
  }

  .st-tk-new {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  .st-tk-x {
    width: 32px;
    height: 32px;
  }

  .st-tk-x svg {
    width: 16px;
    height: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #st-ticket {
    transition: none;
  }

  .st-tk-spin {
    animation-duration: 2.4s;
  }
}
