/* ============================== */
/* Cookies - Estilos Generales   */
/* ============================== */

:root {
    --cookie-bg: rgb(235, 235, 235);
    --cookie-text: #000;
    --cookie-link: #0066cc;
    --cookie-border: #ccc;
    --cookie-grey: #333;
}

#notification-cookies {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: 100vh;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    /* Prevenir layout shift */
    contain: layout style paint;
}

#notification-cookies-wrapper,
#cookies-detalles {
    background-color: var(--cookie-bg);
    color: var(--cookie-text);
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.5;
}

#notification-cookies-wrapper {
    padding: 15px;
}

#cookies-detalles {
    display: none;
    padding: 20px 15px;
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#cookies-detalles h4 {
    font-size: 1.3em;
    margin: 0 0 1em 0;
    color: var(--cookie-grey);
    padding-top: 10px;
}

#cookies-detalles h5 {
    font-size: 1.1em;
    margin: 1.5em 0 0.8em 0;
    color: #444;
    font-weight: 600;
}

#cookies-detalles p {
    line-height: 1.6;
    margin-bottom: 1.2em;
}

#cookies-detalles a {
    color: var(--cookie-link);
    text-decoration: underline;
}

#cookies-detalles a:hover {
    text-decoration: none;
}

#cookies-detalles a[target="_blank"]::after {
    content: " ↗";
    font-size: 0.9em;
}

#cookies-detalles input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

#cookies-detalles strong {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

#notification-cookies-wrapper p {
    margin-bottom: 0;
    min-height: 20px;
}

#configurar-cookies-btn {
    cursor: pointer;
    text-decoration: underline;
    color: var(--cookie-link);
    font-weight: bold;
}

#configurar-cookies-btn:hover {
    text-decoration: none;
}

/* ============================== */
/* Cookies - Botones              */
/* ============================== */

.notification-cookies-boton {
    background-color: #000;
    color: white;
    font-weight: bold;
    padding: 10px 25px;
    margin: 8px 5px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.notification-cookies-aceptar {
    background-color: #000;
    color: white;
    border: 2px solid #000;
}

.notification-cookies-aceptar:hover {
    background-color: #333;
    border-color: #333;
}

.notification-cookies-rechazar {
    color: grey;
    background-color: transparent;
    border: 1px solid grey;
}

.notification-cookies-configurar {
    background-color: #f0f0f0;
    color: var(--cookie-grey);
    border: 2px solid var(--cookie-border);
}

.notification-cookies-configurar:hover {
    background-color: #e0e0e0;
}

#aceptar_cookies_detalles {
    margin-top: 20px;
    background-color: #000;
    color: white;
    padding: 10px 30px;
    border-radius: 5px;
    border: none;
    display: inline-block;
}

#aceptar_cookies_detalles:hover {
    background-color: #333;
}

/* ============================== */
/* Cookies - Accesibilidad        */
/* ============================== */

#cookies-detalles :focus {
    outline: 2px solid var(--cookie-link);
    outline-offset: 2px;
}

/* ============================== */
/* Cookies - Responsive ≤ 768px   */
/* ============================== */

@media (max-width: 768px) {
    #notification-cookies-wrapper,
    #cookies-detalles {
        padding: 15px 20px;
    }

    .notification-cookies-boton {
        display: block;
        width: 100%;
        margin: 8px 0;
    }

    #notification-cookies {
        align-items: flex-start;
    }

    #notification-cookies-wrapper p,
    #cookies-detalles p {
        font-size: 15px;
    }
}

/* ============================== */
/* Cookies - Responsive ≥ 769px   */
/* ============================== */

@media (min-width: 769px) {
    #notification-cookies-wrapper,
    #cookies-detalles {
        padding: 15px 80px;
    }

    #cookies-detalles {
        margin: 0 auto;
    }

    .notification-cookies-boton {
        display: inline-block;
        width: auto;
        margin: 10px 10px 10px 0;
    }

    #notification-cookies-wrapper p,
    #cookies-detalles p {
        text-align: left;
    }

    #notification-cookies-wrapper {
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        flex-wrap: wrap;
    }

    .botones-cookies {
        flex-shrink: 0;
    }
}