/* ============================================
   Julio Lentes — banner de cookies (js/cookie-consent.js)
   ============================================ */

.jl-consent {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 2147483000; /* por encima de hero, WhatsApp y modales */
    display: flex;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-family: 'Roboto', Arial, sans-serif;
}

.jl-consent.is-visible {
    opacity: 1;
}

/* Modo obligatorio: capa sobre todo el sitio */
.jl-consent--blocking {
    inset: 0;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    pointer-events: auto;
}

html.jl-consent-open,
html.jl-consent-open body {
    overflow: hidden;
}

.jl-consent__dialog {
    pointer-events: auto;
    box-sizing: border-box;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    padding: 28px;
}

.jl-consent__title {
    margin: 0 0 12px;
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.jl-consent__text {
    margin: 0 0 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333333;
}

.jl-consent__text a {
    color: #1a1a1a;
    text-decoration: underline;
}

.jl-consent__prefs {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
}

.jl-consent__prefs[hidden] {
    display: none;
}

.jl-consent__pref {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.45;
    cursor: pointer;
}

.jl-consent__pref input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #1a1a1a;
    flex-shrink: 0;
}

/* Aceptar y Rechazar: mismo tamaño y mismo peso visual */
.jl-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.jl-consent__btn {
    min-height: 52px;
    padding: 14px 20px;
    border: 2px solid #1a1a1a;
    border-radius: 6px;
    background: #1a1a1a;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.jl-consent__btn:hover {
    background: #ffffff;
    color: #1a1a1a;
}

.jl-consent__btn:focus-visible,
.jl-consent__link:focus-visible {
    outline: 3px solid #7aa7ff;
    outline-offset: 2px;
}

.jl-consent__secondary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.jl-consent__link {
    background: none;
    border: none;
    padding: 8px;
    color: #1a1a1a;
    font-size: 0.95rem;
    text-decoration: underline;
    cursor: pointer;
}

.jl-consent__btn--save {
    width: 100%;
}

.jl-consent__link[hidden],
.jl-consent__btn[hidden] {
    display: none;
}

/* Móvil: hoja inferior */
@media (max-width: 600px) {
    .jl-consent {
        padding: 0;
    }

    .jl-consent--blocking {
        align-items: flex-end;
    }

    .jl-consent__dialog {
        max-width: none;
        border-radius: 16px 16px 0 0;
        padding: 22px 16px calc(16px + env(safe-area-inset-bottom));
        max-height: 85vh;
    }

    .jl-consent__title {
        font-size: 1.1rem;
    }

    .jl-consent__text {
        font-size: 0.9rem;
    }
}

/* Botón con aspecto de enlace para "Preferencias de cookies" dentro de un texto */
.link-button {
    display: inline;
    padding: 0;
    border: none;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}
