/* Cookie 同意橫幅與頁尾「Cookie 設定」。首頁與法律頁共用，所以不依賴 home.css／styles.css 的變數。 */
.consent-banner {
  position: fixed;
  inset: auto 16px calc(16px + env(safe-area-inset-bottom, 0px)) 16px;
  z-index: 2147483000; /* 選擇前蓋在頁面與客服泡泡之上。 */
  max-width: 720px;
  margin: 0 auto;
  background: #ffffff;
  color: #142d2b;
  border: 1px solid #d5dfd8;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(20, 45, 43, 0.18);
  font-family: "Noto Sans TC", system-ui, sans-serif;
  max-height: calc(100vh - 32px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}
.consent-banner[hidden] { display: none; }
.consent-inner { padding: 18px 20px; display: grid; gap: 10px; }
.consent-title { margin: 0; font-size: 17px; font-weight: 700; }
.consent-text { margin: 0; font-size: 15px; line-height: 1.7; color: #34463f; }
.consent-text a { color: #12665d; }
.consent-custom { display: grid; gap: 8px; }
.consent-custom[hidden] { display: none; }
.consent-option { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.6; }
.consent-option input { width: 20px; height: 20px; margin-top: 3px; accent-color: #12665d; flex: none; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* 三個選擇同樣醒目：同色、同大小，不把「接受」做成唯一的主按鈕。 */
.consent-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid #12665d;
  border-radius: 999px;
  background: #ffffff;
  color: #12665d;
  font: 700 15px/1 "Noto Sans TC", system-ui, sans-serif;
  cursor: pointer;
}
.consent-button[hidden] { display: none; }
.consent-button:hover { background: #edf3ed; }
.consent-button:focus-visible,
.cookie-settings-link:focus-visible { outline: 3px solid #f0a845; outline-offset: 2px; }
.cookie-settings-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  min-height: 44px;
}

@media (min-width: 521px) and (max-width: 900px) {
  .consent-banner {
    inset: auto 84px calc(16px + env(safe-area-inset-bottom, 0px)) 16px;
    margin-right: 0;
  }
}

/* 客服泡泡固定在右下角、層級在最上面；手機版橫幅抬高到泡泡上方，按鈕才不會被它蓋住。 */
@media (max-width: 520px) {
  .consent-banner { 
    inset: auto 8px calc(84px + env(safe-area-inset-bottom, 0px)) 8px; 
    max-height: calc(100vh - 92px - env(safe-area-inset-bottom, 0px));
  }
  .consent-button { flex: 1 1 100%; }
}
