/* ============================================
   Cookie Consent Banner — PS Gold Solutions
   Theme: Dark Navy (#051856) + Gold Accents
   ============================================ */

/* --- Overlay (dims page behind modal) --- */
.cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.cc-overlay.cc-visible {
    opacity: 1;
    visibility: visible;
}

/* --- Main Banner Container --- */
.cc-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99999;
    max-width: 440px;
    width: calc(100% - 48px);
    background: linear-gradient(135deg, #051856 0%, #0a2a7a 50%, #051856 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 28px 26px 22px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 215, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    font-family: "Montserrat", sans-serif;
    color: #e0e6f0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    /* Animation: slide-up + fade-in */
    transform: translateY(120%);
    opacity: 0;
    visibility: hidden;
    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.55s ease;
}
.cc-banner.cc-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* --- Cookie Icon + Title Row --- */
.cc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.cc-cookie-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(255, 215, 0, 0.3));
}
.cc-title {
    font-family: "Syne", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.01em;
}

/* --- Message Text --- */
.cc-message {
    font-size: 13.5px;
    line-height: 1.65;
    color: rgba(224, 230, 240, 0.82);
    margin: 0 0 18px;
}
.cc-message a {
    color: #d4a843;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.25s ease;
}
.cc-message a:hover {
    color: #f0c95e;
    text-decoration: underline;
}

/* --- Category Toggles Section --- */
.cc-categories {
    display: none; /* hidden by default, shown when "Customize" is clicked */
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
    padding: 16px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    animation: ccFadeIn 0.35s ease forwards;
}
.cc-categories.cc-show {
    display: flex;
}

@keyframes ccFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cc-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cc-category-info {
    display: flex;
    flex-direction: column;
}
.cc-category-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}
.cc-category-desc {
    font-size: 11.5px;
    color: rgba(224, 230, 240, 0.55);
    margin-top: 1px;
}

/* Toggle Switch Styles */
.cc-toggle {
    position: relative;
    width: 42px;
    height: 22px;
    flex-shrink: 0;
    margin-left: 12px;
}
.cc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.cc-toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.cc-toggle-slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.cc-toggle input:checked + .cc-toggle-slider {
    background: #d4a843;
}
.cc-toggle input:checked + .cc-toggle-slider::before {
    transform: translateX(20px);
}
.cc-toggle input:disabled + .cc-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Essential Badge --- */
.cc-essential-badge {
    font-size: 10px;
    padding: 2px 8px;
    background: rgba(212, 168, 67, 0.2);
    color: #d4a843;
    border-radius: 6px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-left: 12px;
    flex-shrink: 0;
}

/* --- Buttons Row --- */
.cc-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cc-btn {
    flex: 1;
    min-width: 90px;
    padding: 11px 16px;
    border: none;
    border-radius: 10px;
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

/* Accept All — Gold gradient primary CTA */
.cc-btn-accept {
    background: linear-gradient(135deg, #d4a843 0%, #b8912c 100%);
    color: #051856;
    box-shadow: 0 4px 16px rgba(212, 168, 67, 0.3);
}
.cc-btn-accept:hover {
    background: linear-gradient(135deg, #e6bc5a 0%, #d4a843 100%);
    box-shadow: 0 6px 24px rgba(212, 168, 67, 0.45);
    transform: translateY(-1px);
}

/* Reject — Subtle outline */
.cc-btn-reject {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(224, 230, 240, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.cc-btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Customize — Text-style link */
.cc-btn-customize {
    background: transparent;
    color: #d4a843;
    flex: 0 0 auto;
    min-width: auto;
    padding: 11px 10px;
    font-weight: 600;
}
.cc-btn-customize:hover {
    color: #f0c95e;
    text-decoration: underline;
}

/* Save Preferences — replaces Customize when categories visible */
.cc-btn-save {
    background: linear-gradient(135deg, #d4a843 0%, #b8912c 100%);
    color: #051856;
    box-shadow: 0 4px 16px rgba(212, 168, 67, 0.3);
}
.cc-btn-save:hover {
    background: linear-gradient(135deg, #e6bc5a 0%, #d4a843 100%);
    box-shadow: 0 6px 24px rgba(212, 168, 67, 0.45);
    transform: translateY(-1px);
}

/* --- Floating Cookie Settings Button --- */
.cc-settings-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99997;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #051856 0%, #0a2a7a 100%);
    border: 1px solid rgba(255, 215, 0, 0.15);
    color: #d4a843;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 215, 0, 0.08);
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);

    /* Hidden by default, shown after consent given */
    opacity: 0;
    visibility: hidden;
    transform: scale(0.7);
}
.cc-settings-btn.cc-visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}
.cc-settings-btn:hover {
    transform: scale(1.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.45),
        0 0 0 2px rgba(212, 168, 67, 0.25);
    background: linear-gradient(135deg, #0a2a7a 0%, #0f3596 100%);
}
.cc-settings-btn:active {
    transform: scale(0.95);
}

/* Tooltip for settings button */
.cc-settings-btn::after {
    content: "Cookie Settings";
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #051856;
    color: #e0e6f0;
    font-size: 11.5px;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.cc-settings-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   Responsive Design
   ============================================ */
@media screen and (max-width: 480px) {
    .cc-banner {
        bottom: 12px;
        left: 12px;
        width: calc(100% - 24px);
        max-width: none;
        padding: 22px 18px 18px;
        border-radius: 16px;
    }
    .cc-title {
        font-size: 16px;
    }
    .cc-message {
        font-size: 12.5px;
    }
    .cc-buttons {
        gap: 6px;
    }
    .cc-btn {
        padding: 10px 12px;
        font-size: 12px;
        min-width: 70px;
    }
    .cc-settings-btn {
        bottom: 12px;
        left: 12px;
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
    .cc-settings-btn::after {
        display: none; /* hide tooltip on mobile */
    }
    .cc-categories {
        padding: 12px 10px;
    }
    .cc-category-name {
        font-size: 12px;
    }
    .cc-category-desc {
        font-size: 10.5px;
    }
}

@media screen and (min-width: 481px) and (max-width: 768px) {
    .cc-banner {
        bottom: 16px;
        left: 16px;
        width: calc(100% - 32px);
        max-width: 400px;
    }
}

/* --- Print: hide everything --- */
@media print {
    .cc-banner,
    .cc-overlay,
    .cc-settings-btn {
        display: none !important;
    }
}
