/* Cookie consent banner — self-hosted, no external library (see js/cookie-consent.js). */

#pc-cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 9999;
    max-width: 480px;
    margin-left: auto;
    background: #0c0f1c;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.45);
    padding: 1.25rem 1.35rem;
    font-family: 'Inter', sans-serif;
    color: var(--text);
}

#pc-cookie-banner h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--text);
}

#pc-cookie-banner p {
    font-size: 0.83rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

#pc-cookie-banner a {
    color: var(--primary-light);
    text-decoration: underline;
}

.pc-cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.pc-cc-btn {
    flex: 1 1 auto;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    white-space: nowrap;
}

.pc-cc-btn:hover { background: rgba(255,255,255,0.06); }

.pc-cc-btn.pc-cc-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pc-cc-btn.pc-cc-primary:hover { background: var(--primary-dark); }

/* Persistent re-open icon, shown once a choice has been made (bottom-left, opposite the banner). */
#pc-cookie-icon {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 9998;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #0c0f1c;
    color: var(--primary-light);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

#pc-cookie-icon:hover { background: rgba(255,255,255,0.06); }

/* Preferences modal */
#pc-cookie-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(4,5,11,0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#pc-cookie-modal {
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    background: #0c0f1c;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    font-family: 'Inter', sans-serif;
    color: var(--text);
}

#pc-cookie-modal h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 1.25rem;
}

.pc-cc-category {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.75rem;
}

.pc-cc-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.4rem;
}

.pc-cc-category-head strong { font-size: 0.9rem; }

.pc-cc-category p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

/* Toggle switch */
.pc-cc-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.pc-cc-switch input { opacity: 0; width: 0; height: 0; }

.pc-cc-switch .pc-cc-slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 999px;
    transition: 0.15s;
}

.pc-cc-switch .pc-cc-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.15s;
}

.pc-cc-switch input:checked + .pc-cc-slider { background: var(--primary); }
.pc-cc-switch input:checked + .pc-cc-slider::before { transform: translateX(18px); }
.pc-cc-switch input:disabled + .pc-cc-slider { opacity: 0.5; cursor: not-allowed; }

#pc-cookie-modal .pc-cc-actions { margin-top: 1.25rem; }

@media (max-width: 560px) {
    #pc-cookie-banner { left: 0.5rem; right: 0.5rem; bottom: 0.5rem; max-width: none; }
}
