/* ============================================= */
/* 趣抽獎區塊：解鎖進度圖／檔期 tab／投入時間／獎品 grid
   Figma section_趣抽獎 2307:212486（M）、2315:212670（PC）。
   獎品卡本身樣式在 lottery-card.css。 */
/* ============================================= */
.lottery {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- 解鎖進度圖：寬度撐滿，高度依圖片比例等比縮放（M／PC 各一張） ---- */
.lottery__unlock {
  margin: 0;
  cursor: pointer;
}

.lottery__unlock img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- 檔期與獎品們 ---- */
.lottery__board {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 16px 16px 32px;
  background: var(--purple-700);
  border: 2px solid var(--navy-dark);
  border-radius: 16px 16px 40px 40px;
}

.lottery__panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---- 檔期 tab：M 版放不下三個時可左右滑動 ---- */
.lottery__tabs {
  display: flex;
  gap: 14px;
  margin: 0 -16px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.lottery__tabs::-webkit-scrollbar {
  display: none;
}

.lottery__tab {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  width: 105px;
  padding: 10px;
  background: var(--purple-600);
  border: 2px solid var(--white-soft);
  border-radius: 24px;
  font-weight: 900;
  line-height: normal;
  color: var(--white-soft);
  text-align: center;
  cursor: pointer;
}

.lottery__tab.is-active {
  background: var(--tab-active);
  border-color: var(--navy);
}

/* Figma tab 高 72px：扣掉 padding、框線後兩行文字共 48px */
.lottery__tab-title {
  font-size: 24px;
  line-height: 1.2;
  white-space: nowrap;
}

.lottery__tab-sub {
  font-size: 16px;
  line-height: 1.2;
}

/* ---- 投入時間 ---- */
.lottery__time-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 8px 12px;
  background: var(--pink-500);
  border: 2px solid var(--navy);
  border-radius: 8px;
  box-shadow: var(--shadow-navy-4);
  font-size: 13px;
  line-height: 16px;
  color: #fff;
}

/* 載入中、載入失敗還沒有日期時隱藏（lottery.js），保留高度 */
.lottery__time-badge.is-hidden {
  visibility: hidden;
}

.lottery__time-badge-icon {
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
}

.lottery__time-badge-label {
  font-weight: 500;
  white-space: nowrap;
}

.lottery__time-badge-value {
  overflow: hidden;
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---- 獎品 grid：M 2 欄、PC 4 欄 ---- */
.lottery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lottery__grid-item {
  display: flex;
}

/* 載入失敗、0 筆時的提示文字 */
.lottery__grid-message {
  grid-column: 1 / -1;
  margin: 0;
  padding: 24px 0;
  font-size: 14px;
  line-height: 22px;
  color: #fff;
  text-align: center;
}

/* ============================================= */
/* PC 版 */
/* ============================================= */
@media (min-width: 768px) {
  .lottery__tabs {
    justify-content: center;
    margin: 0;
    padding: 0;
  }

  .lottery__time-badge {
    width: 320px;
    max-width: 100%;
    margin: 0 auto;
  }

  .lottery__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
