@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* =========================================
   PROMPTGENLAB COOKIE SYSTEM — ULTRA PREMIUM
========================================= */

/* ---------- DESIGN TOKENS ---------- */
:root {
    --brand-amber:    #FF9F1C;
    --brand-crimson:  #FF2E63;
    --brand-gradient: linear-gradient(135deg, #FF9F1C 0%, #FF2E63 100%);
    --brand-glow:     rgba(255, 159, 28, 0.22);
    --brand-glow-lg:  rgba(255, 159, 28, 0.12);

    --surface-0:  rgba(10, 8, 10, 0.99);
    --surface-1:  rgba(18, 14, 16, 0.98);
    --surface-2:  rgba(28, 22, 24, 0.92);
    --surface-3:  rgba(255, 255, 255, 0.035);
    --surface-4:  rgba(255, 255, 255, 0.065);

    --border-base:    rgba(255, 159, 28, 0.13);
    --border-subtle:  rgba(255, 159, 28, 0.07);
    --border-strong:  rgba(255, 159, 28, 0.30);

    --text-primary:   #f0e8e9;
    --text-secondary: #9aa4b2;
    --text-muted:     #5a6270;

    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  18px;
    --radius-xl:  26px;
    --radius-2xl: 32px;

    --shadow-banner:
        0 -20px 70px rgba(0, 0, 0, 0.65),
        0 -2px  30px rgba(255, 159, 28, 0.08),
        0 -1px  0px  rgba(255, 159, 28, 0.15);
    --shadow-modal:
        0 40px 100px rgba(0, 0, 0, 0.80),
        0  0   120px rgba(255, 159, 28, 0.12),
        0  0    40px rgba(255, 46, 99, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);

    --font-display: 'Syne', sans-serif;
    --font-body:    'DM Sans', sans-serif;
}


/* =========================================
   COOKIE BANNER — ULTRA PREMIUM
========================================= */

#cookieBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface-0);
    backdrop-filter: blur(40px) saturate(200%) brightness(0.85);
    -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(0.85);
    border-top: 1px solid var(--border-base);
    padding: 22px 0;
    z-index: 1045;
    box-shadow: var(--shadow-banner);
    font-family: var(--font-body);
    animation: bannerSlideUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes bannerSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Top gradient edge — now double-layered for depth */
#cookieBanner::before {
    content: '';
    position: absolute;
    top: -1px; left: 0; right: 0;
    height: 2px;
    background: var(--brand-gradient);
    opacity: 0.6;
    pointer-events: none;
    border-radius: 0;
    filter: blur(0.5px);
}

/* Ambient inner glow */
#cookieBanner::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 120px;
    background: linear-gradient(180deg, rgba(255, 159, 28, 0.04) 0%, transparent 100%);
    pointer-events: none;
}

/* Cookie icon indicator */
.cookie-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(255, 159, 28, 0.10);
    border: 1px solid rgba(255, 159, 28, 0.20);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.cookie-icon-wrap::before {
    content: '🍪';
    font-size: 20px;
    line-height: 1;
    filter: saturate(1.4);
}

.cookie-icon-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,159,28,0.15), transparent 70%);
}

/* Heading */
#cookieBanner strong {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

/* Body copy */
#cookieBanner p {
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 300;
}

/* Policy link */
#cookieBanner a {
    color: var(--brand-amber);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 159, 28, 0.25);
    transition: border-color var(--transition), color var(--transition),
                text-shadow var(--transition);
    padding-bottom: 1px;
}

#cookieBanner a:hover {
    color: #ffbc5e;
    border-color: rgba(255, 159, 28, 0.65);
    text-shadow: 0 0 20px rgba(255, 159, 28, 0.4);
}


/* ---- Button group ---- */

.cookie-btn-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    align-items: center;
}

/* Base button */
#cookieBanner .btn {
    height: 42px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.025em;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition:
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition-bounce),
        filter var(--transition);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

/* Ripple shimmer on hover */
#cookieBanner .btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.06) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
    pointer-events: none;
}

#cookieBanner .btn:hover::before {
    transform: translateX(100%);
}

#cookieBanner .btn:active {
    transform: scale(0.96);
}

/* Manage Preferences */
#cookieBanner .btn-outline-light {
    border: 1px solid var(--border-strong);
    color: var(--brand-amber);
    background: rgba(255, 159, 28, 0.07);
    backdrop-filter: blur(8px);
}

#cookieBanner .btn-outline-light:hover {
    background: rgba(255, 159, 28, 0.13);
    border-color: rgba(255, 159, 28, 0.55);
    box-shadow: 0 0 22px rgba(255, 159, 28, 0.15),
                inset 0 0 14px rgba(255, 159, 28, 0.05);
}

/* Reject All */
#cookieBanner .btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--text-secondary);
    backdrop-filter: blur(8px);
}

#cookieBanner .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
}

/* Accept All — hero CTA */
#cookieBanner .btn-success {
    background: var(--brand-gradient);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow:
        0 4px 20px rgba(255, 46, 99, 0.35),
        0 2px  8px rgba(255, 159, 28, 0.25),
        inset 0 1px 0 rgba(255,255,255,0.18);
    position: relative;
    overflow: hidden;
}

/* Gloss overlay */
#cookieBanner .btn-success::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, transparent 100%);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    pointer-events: none;
}

#cookieBanner .btn-success:hover {
    box-shadow:
        0 8px 32px rgba(255, 46, 99, 0.48),
        0 4px 14px rgba(255, 159, 28, 0.35),
        inset 0 1px 0 rgba(255,255,255,0.20);
    filter: brightness(1.08);
    transform: translateY(-1px);
}


/* =========================================
   BACKDROP
========================================= */

.modal-backdrop {
    z-index: 1070 !important;
    background: rgba(4, 2, 4, 0.90);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}


/* =========================================
   COOKIE MODAL — ULTRA PREMIUM
========================================= */

#cookieModal {
    z-index: 1080 !important;
    font-family: var(--font-body);
}

#cookieModal .modal-dialog {
    animation: modalPop 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.92) translateY(24px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    }
}

#cookieModal .modal-content {
    background: var(--surface-1);
    border: 1px solid var(--border-base);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-modal);
    overflow: hidden;
    position: relative;
}

/* Corner glow orbs */
#cookieModal .modal-content::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(255,159,28,0.09) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

#cookieModal .modal-content::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(255,46,99,0.07) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

#cookieModal .modal-content > * { position: relative; z-index: 1; }

/* ---- Header ---- */

#cookieModal .modal-header {
    padding: 24px 26px 20px;
    border-bottom: 1px solid var(--border-subtle);
    align-items: center;
    gap: 14px;
}

/* Modal icon badge */
.cookie-modal-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(255,159,28,0.15) 0%, rgba(255,46,99,0.10) 100%);
    border: 1px solid rgba(255,159,28,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(255,159,28,0.12), inset 0 1px 0 rgba(255,255,255,0.06);
}

#cookieModal .modal-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.015em;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#cookieModal .modal-header .modal-title-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-top: 2px;
    -webkit-text-fill-color: var(--text-muted);
}

#cookieModal .btn-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z' fill='%239aa4b2'/%3E%3C/svg%3E") center / 10px no-repeat;
    border: 1px solid rgba(255,255,255,0.08);
    filter: none;
    opacity: 1;
    transition: background var(--transition), border-color var(--transition), transform var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#cookieModal .btn-close:hover {
    background-color: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.16);
    transform: rotate(90deg) scale(1.05);
}

/* ---- Body ---- */

#cookieModal .modal-body {
    padding: 22px 26px;
}

#cookieModal .modal-body > p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 22px;
    font-weight: 300;
}

/* ---- Cookie option cards ---- */

.cookie-option {
    background: var(--surface-3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 18px 18px;
    margin-bottom: 10px;
    transition: border-color var(--transition), background var(--transition),
                box-shadow var(--transition), transform var(--transition);
    position: relative;
    overflow: hidden;
    cursor: default;
}

/* Left accent bar */
.cookie-option::before {
    content: '';
    position: absolute;
    left: 0; top: 12px; bottom: 12px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--brand-gradient);
    opacity: 0;
    transition: opacity var(--transition), transform var(--transition);
    transform: scaleY(0.4);
}

.cookie-option:hover::before {
    opacity: 0.7;
    transform: scaleY(1);
}

.cookie-option:last-child { margin-bottom: 0; }

.cookie-option:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-base);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,159,28,0.06);
}

/* Active/checked state highlight */
.cookie-option:has(.form-check-input:checked) {
    background: rgba(255, 159, 28, 0.045);
    border-color: rgba(255, 159, 28, 0.16);
}

.cookie-option:has(.form-check-input:checked)::before {
    opacity: 1;
    transform: scaleY(1);
}

.cookie-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

/* Category icon circle */
.cookie-category-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: background var(--transition), border-color var(--transition);
}

.cookie-option:hover .cookie-category-icon {
    background: rgba(255,159,28,0.08);
    border-color: rgba(255,159,28,0.15);
}

.cookie-option h6 {
    font-family: var(--font-display);
    color: var(--text-primary);
    font-size: 13.5px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.015em;
}

.cookie-option p {
    color: var(--text-secondary);
    font-size: 12.5px;
    line-height: 1.65;
    margin: 0;
    font-weight: 300;
    padding-left: 0;
}

/* Required badge — gem style */
.cookie-option .badge {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(255,159,28,0.15) 0%, rgba(255,46,99,0.10) 100%);
    color: var(--brand-amber);
    border: 1px solid rgba(255, 159, 28, 0.25);
    letter-spacing: 0.06em;
    white-space: nowrap;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(255,159,28,0.10);
}

/* ---- Toggle switch — premium pill ---- */

.cookie-option .form-check-input {
    width: 48px;
    height: 26px;
    border-radius: 50px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    cursor: pointer;
    transition:
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition-bounce);
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
}

/* Knob */
.cookie-option .form-check-input::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #c8cdd6;
    transition: transform var(--transition-bounce), background var(--transition), box-shadow var(--transition);
    box-shadow: 0 2px 6px rgba(0,0,0,0.40);
}

.cookie-option .form-check-input:checked {
    background: var(--brand-gradient);
    border-color: transparent;
    box-shadow: 0 0 18px rgba(255, 159, 28, 0.35),
                0 0 6px rgba(255, 46, 99, 0.20);
}

.cookie-option .form-check-input:checked::after {
    transform: translateX(22px);
    background: #fff;
    box-shadow: 0 2px 8px rgba(255,46,99,0.30), 0 1px 4px rgba(0,0,0,0.20);
}

.cookie-option .form-check-input:disabled {
    opacity: 0.40;
    cursor: not-allowed;
}

.cookie-option .form-check-input:disabled::after {
    background: rgba(255,255,255,0.6);
}

.cookie-option .form-check-input:focus-visible {
    outline: 2px solid rgba(255, 159, 28, 0.50);
    outline-offset: 3px;
    box-shadow: none;
}


/* ---- Footer ---- */

#cookieModal .modal-footer {
    padding: 18px 26px;
    border-top: 1px solid var(--border-subtle);
    gap: 10px;
    background: rgba(0,0,0,0.12);
}

#cookieModal .modal-footer .btn {
    height: 42px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition:
        background var(--transition),
        box-shadow var(--transition),
        filter var(--transition),
        transform var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

#cookieModal .modal-footer .btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.06) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
    pointer-events: none;
}

#cookieModal .modal-footer .btn:hover::before {
    transform: translateX(100%);
}

#cookieModal .modal-footer .btn:active { transform: scale(0.96); }

#cookieModal .btn-success {
    background: var(--brand-gradient);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow:
        0 4px 20px rgba(255, 46, 99, 0.32),
        0 2px  8px rgba(255, 159, 28, 0.22),
        inset 0 1px 0 rgba(255,255,255,0.18);
    position: relative;
    overflow: hidden;
}

#cookieModal .btn-success::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 100%);
    pointer-events: none;
}

#cookieModal .btn-success:hover {
    box-shadow:
        0 8px 30px rgba(255, 46, 99, 0.48),
        0 4px 12px rgba(255, 159, 28, 0.32),
        inset 0 1px 0 rgba(255,255,255,0.20);
    filter: brightness(1.08);
    transform: translateY(-1px);
}

#cookieModal .btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--text-secondary);
}

#cookieModal .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text-primary);
}


/* =========================================
   DIVIDER UTILITY
========================================= */

.cookie-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-base), transparent);
    margin: 18px 0;
    border: none;
}


/* =========================================
   Z-INDEX & CLICK-BLOCKING FIX
========================================= */

.card,
.prompt-card,
.comparison-slider {
    z-index: 1;
    position: relative;
}

#ambient-bg,
#ambient-color,
#ambient-overlay {
    z-index: 0 !important;
    pointer-events: none !important;
}

#cookieModal {
    z-index: 1080 !important;
}

.modal-content {
    pointer-events: auto;
}


/* =========================================
   SCROLLBAR (modal body if needed)
========================================= */

#cookieModal .modal-body::-webkit-scrollbar {
    width: 4px;
}

#cookieModal .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

#cookieModal .modal-body::-webkit-scrollbar-thumb {
    background: var(--border-base);
    border-radius: 4px;
}

#cookieModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {
    .cookie-btn-group {
        justify-content: stretch;
        flex-direction: column;
        gap: 8px;
    }

    #cookieBanner .btn {
        width: 100%;
        justify-content: center;
        height: 46px;
    }

    #cookieBanner {
        padding: 18px 0 22px;
    }

    #cookieModal .modal-content {
        border-radius: var(--radius-lg);
        margin: 0 10px;
    }

    #cookieModal .modal-header,
    #cookieModal .modal-body,
    #cookieModal .modal-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    #cookieModal .modal-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    #cookieModal .modal-footer {
        flex-direction: column;
    }

    #cookieModal .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}