/* ==========================================================================
   Cookie Consent Banner — CCPA/CPRA compliant styling
   Symmetrical Accept/Decline buttons per 11 CCR § 7004
   ========================================================================== */

#cc-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: #ffffff;
    color: #333333;
    padding: 20px 24px;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
    display: none;
    font-family: 'PT Sans', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

#cc-banner.cc-visible {
    display: block;
}

#cc-banner .cc-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#cc-banner .cc-text {
    flex: 1 1 480px;
    margin: 0;
}

#cc-banner .cc-text a {
    color: #4db8ff;
    text-decoration: underline;
}

#cc-banner .cc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 0 0 auto;
}

/* Accept and Decline must match in size/prominence — symmetry requirement */
#cc-banner .cc-btn {
    padding: 10px 22px;
    border-radius: 3px;
    border: 1px solid #b90d1e;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    color: #b90d1e;
    min-width: 130px;
    text-align: center;
    transition: background 0.15s ease, color 0.15s ease;
}

#cc-banner .cc-btn:hover {
    background: #b90d1e;
    color: #fff;
}

#cc-banner .cc-btn-accept,
#cc-banner .cc-btn-decline {
    /* identical styling — do not differentiate weight/color between these two */
}

#cc-banner .cc-btn-configure {
    border-color: #999;
    color: #555;
}

/* GPC auto-honored notice — smaller, dismissable, non-blocking */
#cc-gpc-notice {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99998;
    background: #1a3d1a;
    color: #e8ffe8;
    padding: 12px 24px;
    font-family: 'PT Sans', sans-serif;
    font-size: 13px;
    display: none;
    text-align: center;
}

#cc-gpc-notice.cc-visible {
    display: block;
}

#cc-gpc-notice a {
    color: #9fffb0;
    text-decoration: underline;
    margin-left: 8px;
    cursor: pointer;
}

/* ============ Configure / Preferences Modal ============ */

#cc-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}

#cc-modal-overlay.cc-visible {
    display: flex;
}

#cc-modal {
    background: #ffffff;
    color: #333333;
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 6px;
    padding: 28px;
    font-family: 'PT Sans', sans-serif;
}

#cc-modal h3 {
    margin-top: 0;
    color: #222;
    font-size: 20px;
}

#cc-modal p {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.cc-category {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #e0e0e0;
}

.cc-category:last-of-type {
    border-bottom: none;
}

.cc-category-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: #222;
}

.cc-category-info p {
    margin: 0;
    font-size: 13px;
    color: #777;
}

/* Toggle switch */
.cc-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex: 0 0 44px;
}

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

.cc-switch .cc-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #555;
    border-radius: 24px;
    transition: 0.2s;
}

.cc-switch .cc-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.2s;
}

.cc-switch input:checked + .cc-slider {
    background-color: #2e7d32;
}

.cc-switch input:checked + .cc-slider:before {
    transform: translateX(20px);
}

.cc-switch input:disabled + .cc-slider {
    background-color: #2e7d32;
    opacity: 0.6;
    cursor: not-allowed;
}

#cc-modal .cc-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

#cc-modal .cc-btn {
    padding: 10px 20px;
    border-radius: 3px;
    border: 1px solid #b90d1e;
    cursor: pointer;
    font-size: 14px;
    background: transparent;
    color: #b90d1e;
}

#cc-modal .cc-btn:hover {
    background: #b90d1e;
    color: #fff;
}

#cc-modal .cc-btn-save {
    background: #b90d1e;
    color: #fff;
}

@media (max-width: 600px) {
    #cc-banner .cc-inner {
        flex-direction: column;
        align-items: stretch;
    }
    #cc-banner .cc-buttons {
        justify-content: stretch;
    }
    #cc-banner .cc-btn {
        flex: 1 1 0;
    }
}
