/* Cookie Banner & Modal */

/* --- Banner (Bottom Bar) --- */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #1C2E45; /* Deep Navy */
    color: #FFFFFF;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 9990; /* Below Modal */
    display: none; /* Controlled by JS */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-banner-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner-text {
    flex: 1;
    min-width: 280px;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-banner-text a {
    color: #4DA3FF;
    text-decoration: underline;
}
.cookie-banner-text a:hover {
    color: #FFFFFF;
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* --- Buttons --- */
.cookie-btn {
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Primary: Accept All */
.cookie-btn-accept {
    background: linear-gradient(135deg, #0074FF, #4DA3FF);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 116, 255, 0.3);
}
.cookie-btn-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 116, 255, 0.45);
}

/* Secondary: Essentials / Settings */
.cookie-btn-secondary {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: #FFFFFF;
}
.cookie-btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

/* Save in Modal (Dark on Light) */
.cookie-btn-save {
    background: #1C2E45;
    color: #FFFFFF;
}
.cookie-btn-save:hover {
    background: #2B4264;
}

/* --- Modal (Settings) --- */
.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 22, 33, 0.6); /* Backdrop */
    backdrop-filter: blur(4px);
    z-index: 9995;
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-modal {
    background: #FFFFFF;
    color: #0E1621;
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow-y: auto;
    font-family: system-ui, -apple-system, sans-serif;
}

.cookie-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #EFE9E3;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #1C2E45;
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #4A5868;
    cursor: pointer;
    padding: 0;
}

.cookie-modal-body {
    padding: 24px;
}

.cookie-intro {
    font-size: 14px;
    color: #4A5868;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Toggles / Options */
.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #F0F2F5;
}
.cookie-option:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cookie-option-info {
    padding-right: 16px;
}

.cookie-option-title {
    font-size: 15px;
    font-weight: 600;
    color: #1C2E45;
    margin-bottom: 4px;
    display: block;
}

.cookie-option-desc {
    font-size: 13px;
    color: #4A5868;
    line-height: 1.5;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background-color: #0074FF;
}

input:disabled + .cookie-slider {
    background-color: #9BBDE0; /* Lighter blue/grey for disabled checked */
    cursor: not-allowed;
}

input:checked + .cookie-slider:before {
    transform: translateX(20px);
}

.cookie-modal-footer {
    padding: 20px 24px;
    background: #F9FAFB;
    border-top: 1px solid #EFE9E3;
    display: flex;
    justify-content: flex-end;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

@media (max-width: 600px) {
    .cookie-banner-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .cookie-banner-actions {
        width: 100%;
        flex-direction: column;
    }
    .cookie-btn {
        width: 100%;
    }
}
