/*
 * Zihua Rooms - Estilos del aviso de cookies (compartido es / en / fr).
 *
 * "Aceptar" y "Rechazar" comparten exactamente el mismo tamano, color y peso
 * tipografico: rechazar tiene que costar lo mismo que aceptar (RGPD, Ley 25 de
 * Quebec, CPRA).
 */

.zr-cc__banner,
.zr-cc__overlay {
    font-family: "Segoe UI", Aptos, "Times New Roman", serif;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #101820;
}

/* Las reglas de abajo fijan `display`, lo que ganaria al `[hidden]` del
   navegador y dejaria un panel invisible tapando la pagina entera. */
.zr-cc__banner[hidden],
.zr-cc__overlay[hidden] {
    display: none;
}

/* ------------------------------------------------------------------ */
/* Banner                                                              */
/* ------------------------------------------------------------------ */

.zr-cc__banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: #ffffff;
    border-top: 3px solid #0F4761;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.22);
    padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
}

.zr-cc__banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem 1.5rem;
}

.zr-cc__text {
    flex: 1 1 22rem;
    min-width: 0;
}

.zr-cc__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0F4761;
    margin-bottom: 0.2rem;
}

.zr-cc__banner p {
    margin: 0;
}

.zr-cc__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

/* ------------------------------------------------------------------ */
/* Botones                                                             */
/* ------------------------------------------------------------------ */

.zr-cc__btn {
    font: inherit;
    font-weight: 700;
    background: #0F4761;
    color: #ffffff;
    border: 1px solid #0F4761;
    border-radius: 3px;
    padding: 0.6rem 1.4rem;
    min-width: 10.5rem;
    text-align: center;
    cursor: pointer;
}

.zr-cc__btn:hover,
.zr-cc__btn:focus-visible {
    background: #156082;
    border-color: #156082;
}

.zr-cc__btn--secondary {
    background: #ffffff;
    color: #0F4761;
}

.zr-cc__btn--secondary:hover,
.zr-cc__btn--secondary:focus-visible {
    background: #e8f1f6;
    color: #0F4761;
    border-color: #0F4761;
}

.zr-cc__link {
    font: inherit;
    background: none;
    border: none;
    padding: 0.35rem 0.25rem;
    color: #0F4761;
    text-decoration: underline;
    cursor: pointer;
}

.zr-cc__link:hover {
    color: #EB7B43;
}

.zr-cc__banner a,
.zr-cc__dialog a {
    color: #0F4761;
    font-weight: 700;
}

.zr-cc__banner :focus-visible,
.zr-cc__dialog :focus-visible {
    outline: 3px solid #EB7B43;
    outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Panel de preferencias                                               */
/* ------------------------------------------------------------------ */

.zr-cc__overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(15, 71, 97, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.zr-cc__dialog {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    width: min(38rem, 100%);
    max-height: min(90vh, 44rem);
    overflow-y: auto;
    padding: 1.5rem;
}

.zr-cc__dialog h2 {
    font-size: 1.25rem;
    color: #0F4761;
    margin-bottom: 0.5rem;
}

.zr-cc__dialog p {
    margin-bottom: 0.85rem;
}

.zr-cc__group {
    border: 1px solid #cfd9df;
    border-radius: 4px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.85rem;
}

.zr-cc__group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.zr-cc__group-title {
    font-weight: 700;
    color: #0F4761;
}

.zr-cc__group p {
    margin: 0;
    font-size: 0.9rem;
}

.zr-cc__always {
    font-size: 0.85rem;
    font-weight: 700;
    color: #2f6b3a;
    white-space: nowrap;
}

.zr-cc__cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.6rem;
    font-size: 0.82rem;
}

.zr-cc__cookie-table th,
.zr-cc__cookie-table td {
    border: 1px solid #dfe6ea;
    padding: 0.3rem 0.45rem;
    text-align: left;
    vertical-align: top;
}

.zr-cc__status {
    font-size: 0.85rem;
    background: #f2f7fa;
    border-left: 4px solid #156082;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.85rem;
}

.zr-cc__dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.1rem;
}

/* Interruptor accesible: es un checkbox real, solo cambia la piel. */
.zr-cc__switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: none;
    width: 3.25rem;
    height: 1.75rem;
}

.zr-cc__switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.zr-cc__switch-ui {
    pointer-events: none;
    width: 100%;
    height: 100%;
    background: #8a9aa4;
    border-radius: 999px;
    transition: background 0.15s ease-in-out;
}

.zr-cc__switch-ui::before {
    content: "";
    display: block;
    width: 1.35rem;
    height: 1.35rem;
    margin: 0.2rem;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.15s ease-in-out;
}

.zr-cc__switch input:checked + .zr-cc__switch-ui {
    background: #2f6b3a;
}

.zr-cc__switch input:checked + .zr-cc__switch-ui::before {
    transform: translateX(1.5rem);
}

.zr-cc__switch input:focus-visible + .zr-cc__switch-ui {
    outline: 3px solid #EB7B43;
    outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Enlaces legales del pie                                             */
/* ------------------------------------------------------------------ */

.zr-legal-links {
    font-size: 0.85rem;
    margin-top: 0.35rem;
}

.zr-legal-links button {
    font: inherit;
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 640px) {
    .zr-cc__banner-inner {
        gap: 0.75rem;
    }

    .zr-cc__actions {
        width: 100%;
    }

    .zr-cc__btn {
        flex: 1 1 100%;
        min-width: 0;
    }

    .zr-cc__dialog {
        padding: 1.1rem;
    }

    .zr-cc__dialog-actions .zr-cc__btn {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zr-cc__switch-ui,
    .zr-cc__switch-ui::before {
        transition: none;
    }
}
