/* =========================================================
   Season Reward Popup - separated file
   Add after reward.css: <link rel="stylesheet" href="./assets/css/season-popup.css" />
   ========================================================= */

.seasonRewardItem {
  appearance: none;
  border: 0;
  outline: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, filter .18s ease;
}

.seasonRewardItem:hover {
  transform: translateY(-3px) scale(1.04);
  filter: drop-shadow(0 0 10px rgba(0,255,255,.72));
}

.seasonRewardItem:active { transform: scale(.98); }

.seasonPopupOverlay[hidden] { display: none !important; }

.seasonPopupOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 24px;
  background: rgba(1, 3, 15, .78);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.season-popup-open { overflow: hidden; }

.seasonPopup {
  position: relative;
  width: min(92vw, 450px);
  padding: 18px 18px 16px;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 17, 35, .98) 0%, rgba(1, 7, 18, .98) 100%);
  border: 2px solid #13dff6;
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(0, 255, 255, .2),
    0 0 18px rgba(0, 255, 255, .42),
    inset 0 0 18px rgba(0, 255, 255, .12);
  animation: seasonPopupIn .16s ease-out;
}

@keyframes seasonPopupIn {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.seasonPopupClose {
  position: absolute;
  top: -13px;
  right: -13px;
  width: 22px;
  height: 22px;
  border: 1px solid #25f6ff;
  border-radius: 50%;
  background: #06172b;
  color: #7effff;
  font-size: 16px;
  line-height: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0,255,255,.55);
}

.seasonPopupHeader {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
}

.seasonPopupIcon {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
/*
  background: radial-gradient(circle, rgba(0,255,255,.24) 0%, rgba(0,30,55,.24) 70%);
  border: 1px solid rgba(42, 243, 255, .55);
  box-shadow: inset 0 0 12px rgba(0,255,255,.2);
*/
}

.seasonPopupIcon img {
  width: 94px;
  max-width: none;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 6px rgba(0,255,255,.45));
}

.seasonPopupTitleBlock h3 {
  margin: 0 0 5px;
  color: #00f4ff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.seasonPopupTitleBlock p {
  margin: 0;
  color: #d9f7ff;
  font-size: 12px;
  line-height: 1.35;
}

.seasonPopupBody {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 10px;
}

.seasonPopupTable {
  display: grid;
  gap: 4px;
}

.seasonPopupRow {
  display: grid;
  grid-template-columns: 42% 1fr; 
  gap: 8px;
  min-height: 24px;
  align-items: center;
  padding: 5px 8px;
  background: rgba(255,255,255,.105);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 4px;
}

.seasonPopupRow span {
  color: #9ff9ff;
  font-size: 14px;
  font-weight: 500;
}

.seasonPopupRow strong {
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.seasonPopupWarning {
  margin: 10px 0 0;
  color: #ff2c2c;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
}

/* ───── Season Popup — Responsive ───── */
@media (max-width: 768px) {
  .seasonPopupOverlay { padding: 18px; }
  .seasonPopup { width: min(92vw, 360px); padding: 18px 16px 16px; }
}
@media (max-width: 576px) {
  .seasonPopupOverlay { padding: 14px; }
  .seasonPopup { width: min(94vw, 340px); padding: 16px 14px; }
  .seasonPopupHeader { grid-template-columns: 72px 1fr; gap: 10px; }
  .seasonPopupIcon { width: 72px; height: 72px; }
  .seasonPopupIcon img { width: 82px; }
  .seasonPopupRow { grid-template-columns: 38% 1fr; padding: 4px 8px; }
}
@media (max-width: 380px) {
  .seasonPopupOverlay { padding: 10px; }
  .seasonPopup { width: 96vw; padding: 14px 12px; }
  .seasonPopupHeader { grid-template-columns: 64px 1fr; gap: 8px; }
  .seasonPopupIcon { width: 64px; height: 64px; }
  .seasonPopupIcon img { width: 72px; }
  .seasonPopupTitleBlock h3 { font-size: 12px; }
  .seasonPopupTitleBlock p { font-size: 9.5px; }
  .seasonPopupRow span,
  .seasonPopupRow strong { font-size: 9.5px; }
  .seasonPopupClose { top: -10px; right: -10px; width: 20px; height: 20px; font-size: 14px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .seasonPopupOverlay { padding: 10px; align-items: flex-start; padding-top: 30px; }
  .seasonPopup { max-height: calc(100dvh - 60px); overflow-y: auto; }
}

/* =========================================================
   REWARD Lv. MODAL — Season-themed (RewardLv_1000, RewardLv_3000, ...)
   ใช้ class "season-themed-modal" เพื่อ apply theme เดียวกัน
   ========================================================= */

/* Backdrop */
.season-themed-modal.modal {
  background: rgba(1, 3, 15, .78);
  backdrop-filter: blur(3px);
}
.season-themed-modal .modal-dialog {
  max-width: min(94vw, 1100px) !important;
  width: 100% !important;
}

/* Card */
.season-themed-modal .modal-content {
  position: relative;
  width: 100%;
  padding: 0;
  background: linear-gradient(180deg, rgba(2, 17, 35, .98) 0%, rgba(1, 7, 18, .98) 100%) !important;
  border: 2px solid #13dff6 !important;
  border-radius: 4px !important;
  box-shadow:
    0 0 0 1px rgba(0, 255, 255, .2),
    0 0 22px rgba(0, 255, 255, .42),
    inset 0 0 18px rgba(0, 255, 255, .12) !important;
  color: #fff;
  animation: seasonPopupIn .18s ease-out;
}

/* Close button (Bootstrap btn-close fallback + custom) */
.season-themed-modal .modal-content::before {
  content: "";
}

.season-themed-modal .seasonModalClose,
.season-themed-modal .btn-close {
  position: absolute !important;
  top: -13px !important;
  right: -13px !important;
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  margin: 0 !important;

  border: 1px solid #25f6ff !important;
  border-radius: 50% !important;
  background: #06172b !important;
  color: #7effff !important;
  font-size: 18px !important;
  line-height: 22px !important;
  font-weight: 900 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 0 10px rgba(0, 255, 255, .6) !important;
  opacity: 1 !important;
  z-index: 10;
}
.season-themed-modal .seasonModalClose:hover,
.season-themed-modal .btn-close:hover {
  background: #0a2540 !important;
  box-shadow: 0 0 14px rgba(0, 255, 255, .85) !important;
}

/* Body wrapper */
.season-themed-modal .rewardTableMainLayout {
  width: 100%;
  padding: 18px;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Title bar (cyan) */
.season-themed-modal .rewardTable_title {
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 8px 14px 12px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(0, 255, 255, .25);
  background: transparent;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  color: #00f4ff !important;
  font-size: clamp(15px, 1.4vw, 19px);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 0 10px rgba(0, 255, 255, .55);
}

/* 3-column main: image | description | spec */
.season-themed-modal .rewardTableContentMainLayout {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 10px;
}

/* Image cell */
.season-themed-modal .rewardTable_ImgMainLayout {
  width: 160px;
  min-width: 140px;
  padding: 14px;
  border-top: 0;
  background: radial-gradient(circle, rgba(0, 255, 255, .22) 0%, rgba(0, 30, 55, .15) 70%) !important;
  border: 1px solid rgba(42, 243, 255, .55) !important;
  box-shadow: inset 0 0 14px rgba(0, 255, 255, .22) !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.season-themed-modal .rewardTable_Img {
  width: 100%;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}
.season-themed-modal .rewardTable_Img img {
  filter: drop-shadow(0 0 8px rgba(0, 255, 255, .55));
}

/* Description cell */
.season-themed-modal .rewardTable_ContentLayout {
  flex: 1;
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(0, 255, 255, .18) !important;
  border-top: 1px solid rgba(0, 255, 255, .18) !important;
  color: #d9f7ff !important;
  padding: 12px 14px;
  gap: 8px;
}
.season-themed-modal .rewardTable_ContentLayout p {
  font-size: clamp(12px, 1vw, 13.5px);
  line-height: 1.5;
  color: #d9f7ff;
}

/* Spec cell (right) */
.season-themed-modal .rewardTable_ContentLayout_02 {
  width: 280px;
  min-width: 240px;
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(0, 255, 255, .18) !important;
  border-top: 1px solid rgba(0, 255, 255, .18) !important;
  display: flex;
  align-items: stretch;
}

.season-themed-modal .rewardTableDetailBlock {
  width: 100%;
  height: 36px;
  padding: 4px 10px;
  margin: 0;
  border: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
  background: transparent !important;
  color: #ffffff !important;
  font-size: clamp(11.5px, 0.9vw, 13px);

  display: flex;
  align-items: center;
}

/* คอลัมน์แรก = label : สีฟ้าอ่อน */
.season-themed-modal .rewardTable_ContentLayout_02 > div:first-child .rewardTableDetailBlock span {
  color: #9ff9ff !important;
  font-weight: 700;
}
/* คอลัมน์สอง = value : ขาว */
.season-themed-modal .rewardTable_ContentLayout_02 > div:nth-child(2) .rewardTableDetailBlock span {
  color: #ffffff !important;
  font-weight: 500;
}

/* Footer "ITEM SETTING" */
.season-themed-modal .rewardTableContentFooter {
  width: 100%;
  background: rgba(255, 76, 76, .08) !important;
  border: 1px solid rgba(255, 76, 76, .35) !important;
  border-radius: 0;
  color: #ff8a8a;
  font-size: clamp(11px, 0.85vw, 12.5px);
  font-weight: 700;
  padding: 10px 14px;
  gap: 10px;
}
.season-themed-modal .rewardTableContentFooter span { color: #ff8a8a !important; }
.season-themed-modal .rewardTableContentFooter #footer_tittle {
  color: #ff5050 !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  width: auto;
  min-width: 110px;
}

/* =========================================================
   SEASON-THEMED MODAL — Responsive
   ========================================================= */

/* ───── 4K / Ultra-wide (≥1920px) ───── */
@media (min-width: 1920px) {
  .season-themed-modal .modal-dialog { max-width: min(94vw, 1280px) !important; }
  .season-themed-modal .rewardTable_ImgMainLayout { width: 200px; }
  .season-themed-modal .rewardTable_ContentLayout_02 { width: 320px; }
}

/* ───── Desktop XL (1440–1919px) ───── */
@media (min-width: 1440px) and (max-width: 1919px) {
  .season-themed-modal .modal-dialog { max-width: min(94vw, 1180px) !important; }
}

/* ───── Tablet (max 992px) ───── */
@media (max-width: 992px) {
  .season-themed-modal .modal-dialog { max-width: 92vw !important; }
  .season-themed-modal .rewardTable_ImgMainLayout { width: 140px; min-width: 130px; }
  .season-themed-modal .rewardTable_ContentLayout_02 { width: 240px; min-width: 220px; }
}

/* ───── Mobile Large (max 768px) — stack columns ───── */
@media (max-width: 768px) {
  .season-themed-modal .modal-dialog { max-width: 96vw !important; margin: 0.5rem auto; }
  .season-themed-modal .rewardTableMainLayout { padding: 14px; gap: 10px; }

  .season-themed-modal .rewardTableContentMainLayout {
    flex-direction: column;
    gap: 8px;
  }
  .season-themed-modal .rewardTable_ImgMainLayout {
    width: 100%;
    min-width: 0;
    height: 180px;
    padding: 14px;
  }
  .season-themed-modal .rewardTable_ContentLayout {
    padding: 12px;
  }
  .season-themed-modal .rewardTable_ContentLayout_02 {
    width: 100%;
    min-width: 0;
  }
  .season-themed-modal .rewardTableContentFooter {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 12px;
  }
  .season-themed-modal .rewardTableContentFooter #footer_tittle {
    min-width: 0;
  }
}

/* ───── Mobile Medium (max 576px) ───── */
@media (max-width: 576px) {
  .season-themed-modal .modal-dialog { max-width: 94vw !important; }
  .season-themed-modal .rewardTable_title {
    font-size: 14.5px;
    padding: 6px 10px 10px;
  }
  .season-themed-modal .rewardTable_ImgMainLayout { height: 150px; padding: 12px; }
  .season-themed-modal .rewardTable_ContentLayout p { font-size: 12px; line-height: 1.45; }
  .season-themed-modal .rewardTableDetailBlock {
    height: 32px;
    padding: 4px 8px;
    font-size: 11.5px;
  }
}

/* ───── Mobile Small (max 480px) ───── */
@media (max-width: 480px) {
  .season-themed-modal .modal-dialog { margin: 0.25rem auto; max-width: 96vw !important; }
  .season-themed-modal .rewardTableMainLayout { padding: 12px; gap: 8px; }
  .season-themed-modal .rewardTable_title { font-size: 14px; padding: 4px 8px 8px; }
  .season-themed-modal .rewardTable_ImgMainLayout { height: 130px; padding: 10px; }
  .season-themed-modal .rewardTable_ContentLayout { padding: 10px; }
  .season-themed-modal .rewardTable_ContentLayout p { font-size: 11.5px; }
  .season-themed-modal .rewardTableDetailBlock { height: 30px; padding: 3px 8px; font-size: 11px; }
  .season-themed-modal .rewardTableContentFooter { font-size: 10.5px; padding: 8px 10px; }
  .season-themed-modal .seasonModalClose,
  .season-themed-modal .btn-close {
    top: -10px !important;
    right: -10px !important;
    width: 22px !important;
    height: 22px !important;
    font-size: 15px !important;
  }
}

/* ───── Mobile Tiny (max 380px) ───── */
@media (max-width: 380px) {
  .season-themed-modal .rewardTable_ImgMainLayout { height: 110px; padding: 8px; }
  .season-themed-modal .rewardTable_ContentLayout p { font-size: 11px; line-height: 1.4; }
  .season-themed-modal .rewardTableDetailBlock { height: 28px; font-size: 10.5px; }
}

/* ───── Landscape มือถือ (เตี้ย, แนวนอน) ───── */
@media (max-height: 560px) and (orientation: landscape) {
  .season-themed-modal .modal-dialog {
    margin: 8px auto !important;
    max-height: calc(100dvh - 16px);
  }
  .season-themed-modal .modal-content {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }
  .season-themed-modal .rewardTable_ImgMainLayout { width: 130px; height: auto; }
}

/* ───── Hover เฉพาะ device ที่ใช้เมาส์จริง ───── */
@media (hover: none) {
  .season-themed-modal .seasonModalClose:hover,
  .season-themed-modal .btn-close:hover {
    background: #06172b !important;
    box-shadow: 0 0 10px rgba(0, 255, 255, .6) !important;
  }
}

/* ───── ผู้ใช้ลด motion ───── */
@media (prefers-reduced-motion: reduce) {
  .seasonPopup,
  .season-themed-modal .modal-content {
    animation: none !important;
  }
}
