/*----------------------------------------*/
/*----- Cookie Consent Banner -----*/
/*----------------------------------------*/

/* Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    padding: 30px;
    max-width: 420px;
    width: calc(100% - 40px);
    transform: translateY(120%);
    transition: transform 0.4s ease;
}
.cookie-banner.active {
    transform: translateY(0);
}

/* Close button */
.cookie-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    color: #05182b;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}
.cookie-close:hover { opacity: 0.6; }

/* Title */
.cookie-banner h3 {
    font-size: 22px;
    font-weight: 700;
    color: #05182b;
    margin: 0 0 12px;
}

/* Body text */
.cookie-banner p {
    font-size: 15px;
    line-height: 1.6;
    color: #444;
    margin: 0 0 20px;
}
.cookie-banner p a {
    color: #05182b;
    text-decoration: underline;
}
.cookie-banner p a:hover { color: #0082B4; }

/* Separator */
.cookie-separator {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 0 0 20px;
}

/* Buttons */
.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cookie-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 2px solid #05182b;
    transition: all 0.2s ease;
}

.cookie-btn--outline {
    background: #fff;
    color: #05182b;
}
.cookie-btn--outline:hover {
    background: #f0f2f5;
}

.cookie-btn-row {
    display: flex;
    gap: 10px;
}

.cookie-btn--solid {
    background: #05182b;
    color: #fff;
    border-color: #05182b;
    flex: 1;
}
.cookie-btn--solid:hover {
    background: #0a2a4a;
    border-color: #0a2a4a;
}

/* ========== Customize Panel ========== */
.cookie-details {
    display: none;
    margin-bottom: 20px;
}
.cookie-details.active { display: block; }

.cookie-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.cookie-category:last-child { border-bottom: none; }

.cookie-category-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #05182b;
    margin: 0 0 2px;
}
.cookie-category-info p {
    font-size: 12px;
    color: #888;
    margin: 0;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}
.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #0082B4;
}
.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(20px);
}
.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.6;
    cursor: default;
}

/* Save preferences button (shown in detail view) */
.cookie-btn--save {
    display: none;
}
.cookie-details.active ~ .cookie-actions .cookie-btn--save {
    display: inline-block;
}
.cookie-details.active ~ .cookie-actions .cookie-btn-row,
.cookie-details.active ~ .cookie-actions .cookie-btn--outline {
    display: none;
}

/* Floating cookie button (reopen preferences) */
.cookie-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99997;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: scale(0);
    transition: transform 0.3s ease, box-shadow 0.2s ease;
}
.cookie-fab img {
    display: block;
}
.cookie-fab.active {
    transform: scale(1);
}
.cookie-fab:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

/* Responsive */
@media (max-width: 480px) {
    .cookie-banner {
        bottom: 10px;
        right: 10px;
        padding: 24px 20px;
        max-width: calc(100% - 20px);
        width: calc(100% - 20px);
    }
    .cookie-btn-row {
        flex-direction: column;
    }
    .cookie-fab {
        bottom: 12px;
        right: 12px;
    }
}
