/* ==========================================
   BANNER DE COOKIES
========================================== */

.cookie-banner {
    position: fixed;
    z-index: 99999;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
    padding: 24px;
}

.cookie-banner__content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 30px;
}

.cookie-banner__text {
    flex: 1;
}

.cookie-banner h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.cookie-banner p {
    margin: 0 0 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-banner a {
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}


/* ==========================================
   BOTONES
========================================== */

.cookie-btn {
    border: 0;
    border-radius: 8px;
    padding: 11px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.cookie-btn:hover {
    opacity: 0.85;
}

.cookie-btn--primary {
    background: #681ea9;
    color: #fff;
}

.cookie-btn--secondary {
    background: #f1edf5;
    color: #333;
}


/* ==========================================
   PANEL DE CONFIGURACIÓN
========================================== */

.cookie-settings {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-settings__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.cookie-settings__box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.cookie-settings__box h2 {
    margin-top: 0;
}

.cookie-settings__close {
    position: absolute;
    top: 12px;
    right: 15px;
    border: 0;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}


/* ==========================================
   CATEGORÍAS
========================================== */

.cookie-category {
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.cookie-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-category h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.cookie-category p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}


/* ==========================================
   SWITCH
========================================== */

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    min-width: 48px;
    height: 26px;
}

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

.cookie-switch__slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.2s;
}

.cookie-switch__slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}

.cookie-switch input:checked + .cookie-switch__slider {
    background: #681ea9;
}

.cookie-switch input:checked + .cookie-switch__slider::before {
    transform: translateX(22px);
}

.cookie-switch input:disabled + .cookie-switch__slider {
    opacity: 0.6;
    cursor: not-allowed;
}


/* ==========================================
   ACCIONES DEL PANEL
========================================== */

.cookie-settings__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}


/* ==========================================
   ACCESIBILIDAD
========================================== */

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}


/* ==========================================
   MÓVIL
========================================== */

@media (max-width: 767px) {

    .cookie-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 20px;
    }

    .cookie-banner__content {
        display: block;
    }

    .cookie-banner__actions {
        margin-top: 18px;
        display: grid;
        grid-template-columns: 1fr;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-settings__box {
        padding: 25px 20px;
    }

    .cookie-category__header {
        align-items: flex-start;
    }

}