/* ============================================
   CONSENTIMIENTO DE COOKIES + PÁGINAS LEGALES
   Hoja de estilos independiente: no modifica styles.css.
   Reutiliza la tipografía y paleta ya cargadas por la web
   (Cormorant / Source Sans) mediante variables con fallback.
   ============================================ */

.mdl-cookies-banner,
.mdl-cookies-panel {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Fuerza el ocultamiento cuando el atributo "hidden" está presente.
   Necesario porque .mdl-cookies-panel fija su propio "display: flex":
   una regla de display en el mismo elemento anula el comportamiento
   nativo de "hidden" si no se declara con prioridad explícita. */
.mdl-cookies-banner[hidden],
.mdl-cookies-panel[hidden] {
    display: none !important;
}

/* ——— Banner inferior ——— */
.mdl-cookies-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #1a1a1a;
    color: #f5f2ec;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
}

.mdl-cookies-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.mdl-cookies-texto {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1 1 380px;
}

.mdl-cookies-texto a {
    color: #f5f2ec;
    text-decoration: underline;
}

.mdl-cookies-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    flex: 0 0 auto;
}

/* ——— Panel de personalización (modal) ——— */
.mdl-cookies-panel {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.mdl-cookies-panel-inner {
    background: #fffdf9;
    color: #1a1a1a;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 6px;
    padding: 1.75rem;
}

.mdl-cookies-panel-inner h2 {
    margin: 0 0 0.75rem;
    font-family: 'Cormorant', serif;
    font-size: 1.5rem;
    font-weight: 500;
}

.mdl-cookies-panel-inner > p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1.25rem;
}

.mdl-cookies-categoria {
    border-top: 1px solid #e4ddd0;
    padding: 1rem 0;
}

.mdl-cookies-categoria-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.mdl-cookies-categoria-nombre {
    font-weight: 600;
    font-size: 0.95rem;
}

.mdl-cookies-categoria-desc {
    margin: 0.4rem 0 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #4a4a4a;
}

.mdl-cookies-panel-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e4ddd0;
}

/* ——— Interruptor (switch) ——— */
.mdl-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
}

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

.mdl-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cfc7b8;
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

.mdl-switch-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fffdf9;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.mdl-switch input:checked + .mdl-switch-slider {
    background-color: #8a6d3b;
}

.mdl-switch input:checked + .mdl-switch-slider::before {
    transform: translateX(18px);
}

.mdl-switch-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ——— Botones ——— */
.mdl-btn {
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0.6rem 1.1rem;
    border-radius: 3px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.mdl-btn-primario {
    background: #8a6d3b;
    color: #fff;
}

.mdl-btn-primario:hover {
    background: #75592f;
}

.mdl-btn-secundario {
    background: transparent;
    color: inherit;
    border-color: currentColor;
}

.mdl-cookies-banner .mdl-btn-secundario:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mdl-cookies-panel .mdl-btn-secundario:hover {
    background: rgba(0, 0, 0, 0.05);
}

@media (max-width: 640px) {
    .mdl-cookies-banner-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .mdl-cookies-botones {
        justify-content: stretch;
    }
    .mdl-cookies-botones .mdl-btn {
        flex: 1 1 0;
    }
}

/* ——— Contenido de páginas legales (Cookies / Privacidad) ——— */
.mdl-legal {
    max-width: 760px;
    margin: 0 auto;
    padding: 8rem 1.5rem 5rem;
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: #1a1a1a;
}

.mdl-legal h1 {
    font-family: 'Cormorant', serif;
    font-weight: 500;
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.mdl-legal .mdl-legal-actualizado {
    font-size: 0.85rem;
    color: #6b6b6b;
    margin-bottom: 2.5rem;
}

.mdl-legal h2 {
    font-family: 'Cormorant', serif;
    font-weight: 500;
    font-size: 1.4rem;
    margin-top: 2.5rem;
}

.mdl-legal table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.9rem;
}

.mdl-legal th,
.mdl-legal td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border: 1px solid #e4ddd0;
    vertical-align: top;
}

.mdl-legal th {
    background: #f5f2ec;
}

.mdl-legal .mdl-pendiente {
    background: #fff3cd;
    padding: 0 0.3rem;
    border-radius: 2px;
    font-weight: 600;
}
