/* tea-gift.css — 🎁 電子禮物卡（games-plan ⑦）：送禮 sheet／分享／兌換，z 10060 家族 */
/* 入口＝燙金襯線列（2026-07-10 業主自 4 版 mockup 選定 A 案，_gift-btn-mock.html）：
   上下金髮絲線夾一列，襯線標題＋小字副標＋金箭頭，編輯感、透明底 */
.hh-gift-open {
  appearance: none; -webkit-appearance: none;
  display: flex; width: 100%; align-items: center; gap: 12px;
  margin: 16px 0 0;
  min-height: 56px; padding: 13px 4px;
  border: none;
  border-top: 1px solid rgba(176, 138, 60, 0.28);
  border-bottom: 1px solid rgba(176, 138, 60, 0.28);
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}
.hh-gift-open:hover { background: rgba(176, 138, 60, 0.05); }
.hh-gift-open:active { background: rgba(176, 138, 60, 0.09); }
.hh-gift-ic {
  flex: none; width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: #94723e; font-size: 22px;
}
.hh-gift-tx { flex: 1; min-width: 0; }
.hh-gift-t1 {
  display: block;
  font: 600 14.5px/1.3 "Noto Serif TC", "Noto Serif TC Fallback", serif;
  color: #2c3a2e; letter-spacing: 0.08em;
}
.hh-gift-t2 {
  display: block; margin-top: 2px;
  font: 400 11.5px/1.5 var(--font-ui, sans-serif);
  color: #9a9382; letter-spacing: 0.02em;
}
.hh-gift-arr { flex: none; color: #b08a3c; font-size: 16px; }

.hh-gift-overlay {
  position: fixed; inset: 0; z-index: 10060;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(28, 34, 28, 0.55);
  -webkit-backdrop-filter: var(--hh-scrim-blur);
  backdrop-filter: var(--hh-scrim-blur);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.hh-gift-overlay.is-open { opacity: 1; }
.hh-gift-panel {
  position: relative;
  width: 100%; max-width: 420px;
  max-height: 88vh;
  max-height: 88dvh; /* iOS 動態視口（舊 Safari 吃上行 fallback） */
  overflow-y: auto;
  background: linear-gradient(175deg, #fbf9f2, #f4f0e2);
  border-radius: 20px;
  padding: 20px 20px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
}
.hh-gift-overlay.is-open .hh-gift-panel { transform: none; }
.hh-gift-close {
  position: absolute; top: 7px; right: 7px;
  width: 44px; height: 44px; /* 44px 觸控目標；視覺圓底靠背景內縮 */
  border: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 46, 33, 0.06) 0 17px, transparent 17px);
  color: #4a4a42; font-size: 15px; cursor: pointer;
}
.hh-gift-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.hh-gift-head h3 { margin: 0; font: 700 17px/1.2 "Noto Serif TC", "Noto Serif TC Fallback", serif; color: #2c3a2e; letter-spacing: 0.06em; }
.hh-gift-ico { font-size: 18px; }
.hh-gift-loading { padding: 40px 0; text-align: center; color: rgba(44, 58, 46, 0.5); }

.hh-gift-prod {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 14px;
  border: 1px solid rgba(148, 114, 62, 0.25);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.7);
}
.hh-gift-prod img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.hh-gift-prod-name { font: 700 14.5px/1.4 var(--font-ui, sans-serif); color: #1e3a2f; }

.hh-gift-field { display: block; margin-bottom: 12px; }
/* 規格 pills（變體品送禮，2026-07-10）：pill 樣式借全域 .hh-variant-pill（redesign-theme.css） */
.hh-gift-variants .hh-variant-pills { margin: 2px 0 4px; }
.hh-gift-variants .hh-variant-pill:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  text-decoration: line-through;
}
/* 蓋過 .hh-gift-field span 的欄位標題樣式（(0,2,0) > (0,1,1)，免 !important） */
.hh-gift-field .hh-gift-price {
  display: block;
  margin: 6px 0 0;
  font: 700 14px/1 "Noto Serif TC", "Noto Serif TC Fallback", serif;
  color: #94723e;
  letter-spacing: 0.04em;
}
/* [hidden] 防禦：display:block 會蓋掉 hidden 屬性（同 CLAUDE.md 年鑑入口雷） */
.hh-gift-field .hh-gift-price[hidden] { display: none; }
/* 大罐偶數提示＝說明性小字，不用金價字色 */
.hh-gift-field .hh-gift-pack-hint { font: 400 11.5px/1.5 var(--font-ui, sans-serif); color: #9a8f78; }

/* 數量 stepper（2026-07-10 取代下拉 1–3）：− n ＋，值承載在 readonly input */
.hh-gift-qty-row { display: flex; align-items: center; gap: 10px; }
.hh-gift-qtybtn {
  appearance: none; -webkit-appearance: none;
  flex: none; width: 44px; height: 44px;
  border: 1px solid rgba(90, 82, 64, 0.28);
  border-radius: 50%;
  background: #fff;
  color: #2f4b3c;
  font: 600 20px/1 var(--font-ui, sans-serif);
  cursor: pointer;
}
.hh-gift-qtybtn:active { transform: scale(0.94); }
.hh-gift-qty-row input#giftQty {
  flex: none; width: 64px; min-height: 44px;
  text-align: center;
  font: 700 16px/1 var(--font-ui, sans-serif);
}

/* 整車送禮：購物車 footer 入口（燙金襯線列縮小版；.hh-gift-open 底樣式沿用） */
.hh-cart-gift-entry { margin-top: 12px; }
.hh-cart-gift-entry[hidden] { display: none; } /* .hh-gift-open 的 display:flex 會蓋掉 hidden */
/* 整車 sheet 的品項清單（複用兌換頁 .hh-gift-items 底樣式） */
.hh-gift-cart-list li small { display: block; font-size: 11px; color: #9a8f78; margin-top: 1px; }
.hh-gift-field span {
  display: block; margin-bottom: 5px;
  font: 700 12px/1.2 var(--font-ui, sans-serif); color: #5a5240;
  letter-spacing: 0.05em;
}
.hh-gift-field input, .hh-gift-field select, .hh-gift-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(90, 82, 64, 0.28);
  border-radius: 12px;
  background: #fffdf7;
  font: 500 14.5px/1.5 var(--font-ui, sans-serif);
  color: #2c3226;
  box-sizing: border-box;
}
.hh-gift-field textarea { resize: none; }
.hh-gift-field input:focus, .hh-gift-field textarea:focus, .hh-gift-field select:focus {
  outline: none; border-color: rgba(148, 114, 62, 0.6);
}
.hh-gift-note { margin: 8px 2px 12px; font: 500 12px/1.7 var(--font-ui, sans-serif); color: rgba(90, 82, 64, 0.7); }

/* 🎁 送禮分流卡（2026-07-20）：知不知道對方地址 → 兩條路徑，各附使用說明 */
.hh-gift-choose-lead { margin: 2px 2px 14px; font: 600 13.5px/1.7 var(--font-ui, sans-serif); color: #2c3a2e; }
.hh-gift-choice {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  margin-bottom: 12px; padding: 15px 14px;
  border: 1px solid rgba(148, 114, 62, 0.32); border-radius: 15px;
  background: rgba(255, 255, 255, 0.55);
  text-align: left; cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.12s ease;
}
.hh-gift-choice:hover { border-color: rgba(148, 114, 62, 0.6); background: rgba(255, 255, 255, 0.85); }
.hh-gift-choice:active { transform: scale(0.985); }
.hh-gift-choice-ic { font-size: 22px; line-height: 1.2; flex: none; }
.hh-gift-choice-main { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.hh-gift-choice-main b { font: 700 15px/1.35 "Noto Serif TC", "Noto Serif TC Fallback", serif; color: #1e3a2f; letter-spacing: 0.02em; }
.hh-gift-choice-main small { font: 500 12.5px/1.6 var(--font-ui, sans-serif); color: rgba(90, 82, 64, 0.82); }
.hh-gift-choice-how {
  margin-top: 3px; font: 600 11.5px/1.5 var(--font-ui, sans-serif); font-style: normal;
  color: #94723e; letter-spacing: 0.01em;
}
.hh-gift-choice-arrow { flex: none; align-self: center; font-size: 20px; color: rgba(148, 114, 62, 0.6); }

.hh-gift-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px;
  border: 1px solid rgba(148, 114, 62, 0.45);
  border-radius: 999px;
  background: rgba(148, 114, 62, 0.06);
  color: #7a5c2e;
  font: 700 14px/1 var(--font-ui, sans-serif);
  cursor: pointer;
  text-decoration: none;
}
.hh-gift-btn:active { transform: scale(0.97); }
.hh-gift-btn:disabled { opacity: 0.6; }
.hh-gift-pay { width: 100%; background: #2f4b3c; border-color: #2f4b3c; color: #f3ead0; }
.hh-gift-line { background: #06c755; border-color: #06c755; color: #fff; }
.hh-gift-actions { display: flex; gap: 10px; justify-content: center; margin: 12px 0 4px; flex-wrap: wrap; }

.hh-gift-share-lead { margin: 4px 2px 10px; font: 600 14px/1.7 var(--font-ui, sans-serif); color: #2c3a2e; }
.hh-gift-link {
  padding: 12px;
  border: 1px dashed rgba(148, 114, 62, 0.45);
  border-radius: 12px;
  background: #fffdf7;
  font: 500 12px/1.6 monospace;
  color: #5a5240;
  word-break: break-all;
}

/* 🏧 ATM 禮物單：虛擬帳號卡 */
.hh-gift-atm {
  padding: 14px 16px;
  margin: 4px 0 12px;
  border: 1px solid rgba(148, 114, 62, 0.32);
  border-radius: 12px;
  background: linear-gradient(178deg, #fffdf6, #f8f2df);
}
.hh-gift-atm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(148, 114, 62, 0.22);
  font: 500 13px/1.5 var(--font-ui, sans-serif);
  color: #5a5240;
}
.hh-gift-atm-row:last-of-type { border-bottom: none; }
.hh-gift-atm-row span { flex: 0 0 auto; color: #94723e; }
.hh-gift-atm-row b { font: 700 15px/1.4 monospace; color: #2c3226; letter-spacing: 0.02em; text-align: right; word-break: break-all; }
.hh-gift-atm .hh-gift-btn { width: 100%; margin-top: 12px; }

/* 受贈人祝福卡：宣紙質感 */
.hh-gift-card {
  padding: 18px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(148, 114, 62, 0.3);
  border-radius: 8px;
  background: linear-gradient(178deg, #fffdf6, #f8f2df);
  box-shadow: 0 8px 20px rgba(70, 55, 25, 0.1);
  text-align: center;
}
.hh-gift-from { margin: 0 0 8px; font: 700 12px/1.4 var(--font-ui, sans-serif); letter-spacing: 0.12em; color: #94723e; }
.hh-gift-message { margin: 0 0 10px; font: 600 16px/1.9 "Noto Serif TC", "Noto Serif TC Fallback", serif; color: #2c3226; white-space: pre-wrap; }
.hh-gift-items { margin: 0; padding: 0; list-style: none; font: 500 13px/1.8 var(--font-ui, sans-serif); color: #5a5240; }

/* 🎙 語音祝福（innovation ⑤，2026-07-18）：送禮 sheet 錄音列＋受贈卡播放器 */
.hh-gv-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hh-gv-btn {
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  font: 700 13px/1 var(--font-ui, sans-serif);
  color: #8a6a3c;
  border: 1px solid rgba(148, 114, 62, 0.45);
  border-radius: 999px;
  background: rgba(148, 114, 62, 0.05);
  padding: 11px 18px; min-height: 44px;
}
.hh-gv-btn.is-rec {
  color: #9d3f2e;
  border-color: rgba(157, 63, 46, 0.5);
  background: rgba(157, 63, 46, 0.06);
  animation: hh-gv-pulse 1.2s ease-in-out infinite;
}
.hh-gv-btn.is-rec .hh-gv-sec { font-weight: 700; }
@keyframes hh-gv-pulse { 50% { box-shadow: 0 0 0 5px rgba(157, 63, 46, 0.12); } }
.hh-gv-row audio { flex: 1; min-width: 0; height: 40px; }
.hh-gv-mini {
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  font: 600 12px/1 var(--font-ui, sans-serif);
  color: #8a8069;
  border: 1px solid rgba(148, 114, 62, 0.3);
  border-radius: 999px;
  background: none;
  padding: 9px 12px; min-height: 36px;
}
.hh-gv-hint { display: block; margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .hh-gv-btn.is-rec { animation: none; } }
/* 受贈卡播放器 */
.hh-gift-audio { margin: 0 0 12px; }
.hh-gift-audio-label { display: block; font: 700 11.5px/1.5 var(--font-ui, sans-serif); letter-spacing: 0.08em; color: #94723e; margin-bottom: 6px; }
.hh-gift-audio audio { width: 100%; height: 40px; }
