/* ============================================
   Cookie Consent Banner & Preferences Panel
   Matches President Ink Dark Luxury Theme
   ============================================ */

/* ─── COOKIE BANNER ─── */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99998;
    padding: 1.25rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}

#cookie-banner.cb--visible {
    transform: translateY(0);
}

.cb__inner {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(18, 18, 18, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(201, 169, 110, 0.15);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
}

.cb__title {
    font-family: 'Playfair Display', serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #F5F0E8;
    margin: 0 0 0.5rem;
}

.cb__text {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(245, 240, 232, 0.65);
    margin: 0;
}

.cb__link {
    color: #C9A96E;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cb__link:hover {
    color: #D4B980;
    text-decoration: underline;
}

.cb__actions {
    display: flex;
    gap: 0.625rem;
    flex-shrink: 0;
}

.cb__btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: none;
}

/* ACCEPT — gold, prominent */
.cb__btn--accept {
    background: linear-gradient(135deg, #C9A96E, #B8944C);
    color: #0A0A0A;
}

.cb__btn--accept:hover {
    background: linear-gradient(135deg, #D4B980, #C9A96E);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(201, 169, 110, 0.3);
}

/* REJECT — same visual weight as accept (GDPR requirement) */
.cb__btn--reject {
    background: rgba(245, 240, 232, 0.08);
    color: #F5F0E8;
    border: 1px solid rgba(245, 240, 232, 0.2);
}

.cb__btn--reject:hover {
    background: rgba(245, 240, 232, 0.14);
    border-color: rgba(245, 240, 232, 0.35);
    transform: translateY(-1px);
}

/* SETTINGS — subtle */
.cb__btn--settings {
    background: transparent;
    color: rgba(245, 240, 232, 0.7);
    border: 1px solid rgba(245, 240, 232, 0.12);
}

.cb__btn--settings:hover {
    background: rgba(245, 240, 232, 0.06);
    color: #F5F0E8;
    border-color: rgba(245, 240, 232, 0.25);
}


/* ─── PREFERENCES PANEL ─── */
#cookie-preferences {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#cookie-preferences.cp--visible {
    opacity: 1;
}

.cp__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.cp__panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    background: #121212;
    border: 1px solid rgba(201, 169, 110, 0.2);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#cookie-preferences.cp--visible .cp__panel {
    transform: translate(-50%, -50%) scale(1);
}

.cp__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(201, 169, 110, 0.1);
}

.cp__title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #F5F0E8;
    margin: 0;
}

.cp__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #F5F0E8;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cp__close:hover {
    background: rgba(201, 169, 110, 0.15);
    border-color: rgba(201, 169, 110, 0.3);
}

.cp__body {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    flex: 1;
}

.cp__desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(245, 240, 232, 0.6);
    margin: 0 0 1.5rem;
}

/* Category blocks */
.cp__category {
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cp__cat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.cp__cat-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #F5F0E8;
    margin: 0 0 0.25rem;
}

.cp__cat-desc {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: rgba(245, 240, 232, 0.5);
    margin: 0;
}

/* Toggle switch */
.cp__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.cp__toggle input {
    display: none;
}

.cp__slider {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    position: relative;
    transition: background 0.3s ease;
}

.cp__slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #666;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cp__toggle input:checked + .cp__slider {
    background: rgba(201, 169, 110, 0.3);
}

.cp__toggle input:checked + .cp__slider::after {
    left: 23px;
    background: #C9A96E;
}

.cp__toggle--disabled {
    cursor: default;
}

.cp__toggle--disabled .cp__slider {
    background: rgba(201, 169, 110, 0.15);
}

.cp__toggle--disabled .cp__slider::after {
    left: 23px;
    background: #C9A96E;
    opacity: 0.7;
}

.cp__label-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(201, 169, 110, 0.7);
    white-space: nowrap;
}

.cp__footer {
    padding: 1.25rem 2rem;
    border-top: 1px solid rgba(201, 169, 110, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
}


/* ─── COOKIE SETTINGS BUTTON (footer) ─── */
#cookie-settings-btn {
    cursor: pointer;
    transition: color 0.2s ease;
}

#cookie-settings-btn:hover {
    color: #C9A96E !important;
}


/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .cb__inner {
        flex-direction: column;
        padding: 1.25rem 1.5rem;
        gap: 1rem;
    }

    .cb__actions {
        width: 100%;
        flex-direction: column;
    }

    .cb__btn {
        width: 100%;
        text-align: center;
        padding: 0.875rem 1rem;
    }

    .cp__panel {
        width: 95%;
    }

    .cp__header,
    .cp__body,
    .cp__footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .cp__cat-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cp__footer {
        flex-direction: column;
    }

    .cp__footer .cb__btn {
        width: 100%;
        text-align: center;
    }
}

/* ─── Footer Legal Links ─── */
.footer__legal {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.footer__legal .footer__link {
    font-size: 0.8125rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.footer__legal .footer__link:hover {
    opacity: 1;
}

/* ─── Footer Credit ─── */
.footer__credit {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(245, 240, 232, 0.35);
}

.footer__credit-link {
    color: rgba(201, 169, 110, 0.5);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer__credit-link:hover {
    color: #C9A96E;
}
