/* ========================================================================== */
/* 1. Cookie Consent 參數設定 (隨專案變動項目，請在此統一設定) */
/* ========================================================================== */
:root {
  --cc-bg: rgba(35, 24, 21, 0.7);
  --cc-text: #ffffff;
  --cc-primary: #B50D0D; /* 專案主色 (如需替換請改這) */
  --cc-link-color: #fff; /* 連結顏色 (獨立設定) */
  --cc-btn-bg: #B90000;  /* 按鈕背景色 */
  --cc-btn-text: #fff; /* 按鈕文字顏色 */
  --cc-btn-radius: 25px;
  --cc-font-family: "Tenor Sans", "Noto Sans TC", sans-serif;
  --cc-font-size: 14px;
}

/* ========================================================================== */
/* 2. 佈局方向與定位樣式說明 (此區依據各專案的設計稿選擇套用) */
/* ========================================================================== */

/* [橫條滿版樣式] - 例如：設計為置底滿版的一條 */
.cc-window.cc-banner {
  flex-direction: row !important;
  align-items: center;
  width: 100%;
  max-width: 100%;
  padding: 15px 30px;
}
.cc-window.cc-banner.cc-top {
  top: 0;
  left: 0;
  right: 0;
}
.cc-window.cc-banner.cc-bottom {
  bottom: 0;
  left: 0;
  right: 0;
}
.cc-window.cc-banner .cc-message {
  flex: 1 1 auto;
  margin-right: 20px;
}

/* [浮動區塊樣式] - 例如：設計為置右下角落的一塊說明 */
.cc-window.cc-floating {
  flex-direction: column !important;
  max-width: 340px;
  padding: 20px;
  border-radius: 5px;
}
.cc-window.cc-floating.cc-bottom {
  bottom: 20px !important;
}
.cc-window.cc-floating.cc-top {
  top: 20px !important;
}
.cc-window.cc-floating.cc-right {
  right: 20px !important;
  left: auto !important;
}
.cc-window.cc-floating.cc-left {
  left: 20px !important;
  right: auto !important;
}
.cc-window.cc-floating .cc-message {
  margin-bottom: 15px;
  margin-right: 0;
}
.cc-window.cc-floating .cc-compliance {
  width: 100%;
  flex: 1 0 auto;
}

/* ========================================================================== */
/* 3. 專案客製化主題樣式 */
/* ========================================================================== */
.cc-window {
  justify-content: center !important;
  align-items: center !important;
  font-family: var(--cc-font-family);
  font-size: var(--cc-font-size) !important;
  color: var(--cc-text);
  background: var(--cc-bg) !important;
  backdrop-filter: blur(5px) !important;
  z-index: 1020;
  border-radius: 0;
}

.cc-header {
  display: block;
  padding: 10px 0 0;
  font-size: 20px;
  font-weight: 700;
}

.cc-message {
  color: var(--cc-text);
  flex: 0 0 auto !important;
  width: auto;
  line-height: 1.6;
}
.cc-message a {
  color: var(--cc-link-color);
  text-decoration: underline;
  transition: 0.3s;
}
.cc-message a:hover {
  color: #fff;
  text-decoration: underline;
}

.cc-btn {
  color: var(--cc-btn-text);
  background-color: var(--cc-btn-bg);
  border-radius: var(--cc-btn-radius);
  margin: 10px 0;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 400;
  border: none;
  white-space: nowrap;
  min-width: 130px;
  text-align: center;
  transition: all 0.3s ease;
}

.cc-btn:hover {
  color: #fff;
  filter: brightness(0.9);
}

.cc-link {
  color: var(--cc-link-color);
  line-height: 24px;
  text-decoration: underline;
  white-space: nowrap;
  transition: 0.3s;
}
.cc-link:hover {
  color: #fff;
}

/* ========================================================================== */
/* 4. RWD 手機版設定 */
/* ========================================================================== */
@media (max-width: 767px) {
  .cc-window {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 15px !important;
  }
  .cc-window.cc-banner, 
  .cc-window.cc-floating {
    left: 10px !important;
    right: 10px !important;
    width: calc(100% - 20px) !important;
    max-width: 100% !important;
    border-radius: 4px;
  }
  .cc-window.cc-banner.cc-bottom,
  .cc-window.cc-floating.cc-bottom {
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    border-radius: 0;
  }
  .cc-window.cc-banner.cc-top,
  .cc-window.cc-floating.cc-top {
    top: 10px !important;
  }
  .cc-window .cc-message {
    margin-right: 0 !important;
    margin-bottom: 15px !important;
    text-align: left;
  }
  .cc-window .cc-compliance {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .cc-window .cc-btn {
    margin: 0 auto;
    display: block;
  }
}

/* ========================================================================== */
/* 5. 主要框架與動畫 (不常異動，作為底層結構) */
/* ========================================================================== */
.cc-window {
  opacity: 1;
  transition: opacity 1s ease;
  position: fixed;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-wrap: nowrap;
}
.cc-window.cc-invisible {
  opacity: 0;
}
.cc-window.cc-static {
  position: static;
}
.cc-compliance {
  display: flex !important;
  align-items: center;
  justify-content: center !important;
  gap: 10px;
}
.cc-btn, .cc-close, .cc-link, .cc-revoke {
  cursor: pointer;
}
.cc-close {
  display: block;
  position: absolute;
  top: 7px;
  right: 7px;
  font-size: 22px;
  opacity: 0.9;
  line-height: 0.75;
}
.cc-close:focus, .cc-close:hover {
  opacity: 1;
}
.cc-revoke {
  position: fixed;
  overflow: hidden;
  box-sizing: border-box;
  padding: 7px;
  z-index: 9999;
}
.cc-revoke:hover {
  text-decoration: underline;
}
.cc-revoke.cc-top {
  top: 0;
  left: 42px;
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
}
.cc-revoke.cc-bottom {
  bottom: 0;
  left: 42px;
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
}
.cc-revoke.cc-left {
  left: 42px;
  right: unset;
}
.cc-revoke.cc-right {
  right: 42px;
  left: unset;
}
.cc-animate.cc-revoke {
  transition: transform 1s ease;
}
.cc-animate.cc-revoke.cc-top {
  transform: translateY(-28px);
}
.cc-animate.cc-revoke.cc-bottom {
  transform: translateY(28px);
}
.cc-animate.cc-revoke.cc-active.cc-bottom, 
.cc-animate.cc-revoke.cc-active.cc-top {
  transform: translateY(0);
}
.cc-grower {
  max-height: 0;
  overflow: hidden;
  transition: max-height 1s;
}
@media print {
  .cc-revoke, .cc-window {
    display: none;
  }
}