/* ============================================
   Cookie Consent Banner — Cyber Tarot 主題
   ============================================ */

/* 底部固定容器 */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
    background: rgba(10, 10, 15, 0.95);
    border-top: 1px solid rgba(212, 175, 55, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 20px 30px;
    box-sizing: border-box;
    font-family: 'Noto Sans TC', 'Cinzel', sans-serif;
    color: #ccc;
    /* 進場動畫 */
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

#cookie-banner.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#cookie-banner.hidden {
    display: none;
}

/* 主要佈局：文字左邊、按鈕右邊 */
.cb-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* 文字區域 */
.cb-text {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #bbb;
}

.cb-text p {
    margin: 0 0 4px 0;
}

.cb-text .cb-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

/* 「了解更多」展開連結 */
.cb-details-toggle {
    color: var(--gold, #d4af37);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.85rem;
    background: none !important;
    border: none !important;
    border-width: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0;
    margin: 0;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.cb-details-toggle:hover {
    color: #f0d060;
}

.cb-details-toggle:focus,
.cb-details-toggle:focus-visible,
.cb-details-toggle:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* 展開的詳細分類區塊 */
.cb-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin 0.4s ease;
    margin-top: 0;
}

.cb-details.expanded {
    max-height: 200px;
    margin-top: 10px;
}

.cb-details-inner {
    font-size: 0.82rem;
    color: #999;
    line-height: 1.5;
    padding: 8px 12px;
    border-left: 2px solid rgba(212, 175, 55, 0.3);
}

.cb-details-inner strong {
    color: #ddd;
}

/* 按鈕區域 */
.cb-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* 共用按鈕樣式 */
.cb-btn {
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'Noto Sans TC', sans-serif;
    letter-spacing: 1px;
}

/* 接受全部 — 金色主按鈕 */
.cb-btn-accept {
    background: linear-gradient(135deg, #d4af37, #b8962e);
    color: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.3);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.cb-btn-accept:hover {
    background: linear-gradient(135deg, #e6c54a, #d4af37);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.5);
    transform: translateY(-1px);
}

/* 僅限必要 — 灰色次按鈕 */
.cb-btn-essential {
    background: transparent;
    color: #aaa;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.cb-btn-essential:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

/* 響應式：小螢幕時改為上下排列 */
@media (max-width: 768px) {
    .cb-container {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .cb-buttons {
        justify-content: center;
    }
}
