﻿/* ── Cookie Consent ─────────────────────────────────────────── */

.cookie-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    padding: 20px 24px;
    background: #ffffff;
    border-top: 1px solid #ddd;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    .cookie-consent-banner.hide {
        opacity: 0;
        transform: translateY(100%);
    }

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.cookie-consent-text {
    flex: 1;
}

    .cookie-consent-text h2 {
        margin: 0 0 8px;
        font-size: 1.25rem;
        color: #1a1a1a;
    }

    .cookie-consent-text p {
        margin: 0;
        line-height: 1.5;
        color: #444444;
    }

.cookie-consent-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-consent-button {
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

    .cookie-consent-button.primary {
        background: #c9a84c;
        color: #ffffff;
    }

        .cookie-consent-button.primary:hover {
            opacity: 0.9;
        }

    .cookie-consent-button.secondary {
        background: transparent;
        border-color: #c9a84c;
        color: #333333;
    }

        .cookie-consent-button.secondary:hover {
            background: #f7f3e8;
        }


/* ── Cookie Preferences Modal ──────────────────────────────── */

.cookie-preferences-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .cookie-preferences-modal[hidden] {
        display: none;
    }

.cookie-preferences-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.cookie-preferences-dialog {
    position: relative;
    z-index: 1;
    width: min(700px, calc(100% - 32px));
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.cookie-preferences-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #ddd;
}

    .cookie-preferences-header h2 {
        margin: 0;
    }

.cookie-preferences-close {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.cookie-preferences-content {
    padding: 24px;
}

    .cookie-preferences-content > p {
        margin-top: 0;
        line-height: 1.5;
    }

.cookie-category {
    padding: 18px 0;
    border-bottom: 1px solid #e5e5e5;
}

    .cookie-category:last-child {
        border-bottom: 0;
    }

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

    .cookie-category-header h3 {
        margin: 0 0 6px;
        font-size: 1rem;
    }

    .cookie-category-header p {
        margin: 0;
        line-height: 1.45;
        color: #666666;
    }

.cookie-category-status {
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 600;
}


/* ── Switch ────────────────────────────────────────────────── */

.cookie-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

    .cookie-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.cookie-switch-slider {
    position: absolute;
    inset: 0;
    background: #cccccc;
    border-radius: 26px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .cookie-switch-slider::before {
        content: "";
        position: absolute;
        width: 20px;
        height: 20px;
        left: 3px;
        top: 3px;
        background: #ffffff;
        border-radius: 50%;
        transition: transform 0.2s ease;
    }

.cookie-switch input:checked + .cookie-switch-slider {
    background: #c9a84c;
}

    .cookie-switch input:checked + .cookie-switch-slider::before {
        transform: translateX(22px);
    }


/* ── Modal Footer ──────────────────────────────────────────── */

.cookie-preferences-footer {
    display: flex;
    justify-content: flex-end;
    padding: 18px 24px;
    border-top: 1px solid #ddd;
}


/* ── Body ──────────────────────────────────────────────────── */

body.cookie-modal-open {
    overflow: hidden;
}


/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 768px) {

    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .cookie-consent-actions {
        justify-content: stretch;
    }

    .cookie-consent-button {
        flex: 1;
    }
}

@media (max-width: 480px) {

    .cookie-consent-banner {
        padding: 16px;
    }

    .cookie-consent-actions {
        flex-direction: column;
    }

    .cookie-consent-button {
        width: 100%;
    }

    .cookie-preferences-dialog {
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
    }

    .cookie-preferences-header,
    .cookie-preferences-content,
    .cookie-preferences-footer {
        padding-left: 18px;
        padding-right: 18px;
    }
}
