/* Pantallas horizontales: conservar la marca sin ocupar la altura del contenido. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1000px) {
    body .cabecera .cabecera-contenedor {
        min-height: 70px;
        padding-block: 7px;
        padding-left: max(24px, env(safe-area-inset-left, 0px));
        padding-right: max(24px, env(safe-area-inset-right, 0px));
        gap: 8px 16px;
    }
    body .cabecera .cabecera-marca {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        width: 230px;
        max-width: calc(100% - 110px);
    }
    body .cabecera .cabecera-marca .custom-logo-link {
        flex: 0 0 auto;
        width: 100%;
    }
    body .cabecera .cabecera-marca .cabecera-bajada {
        display: block;
        margin: 0;
        padding: 0;
        border: 0;
        color: #514264;
        font-size: 11px;
        line-height: 1.3;
        font-weight: 500;
        white-space: normal;
    }
    body .cabecera .menu-movil-boton { min-height: 44px; }
    body .cabecera.cabecera-interactiva.menu-abierto .navegacion-principal {
        max-height: calc(100vh - 100px - var(--cabecera-admin, 0px));
        max-height: calc(100dvh - 100px - var(--cabecera-admin, 0px));
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

/* Complianz: anular el zoom anidado del banner generado para poca altura.
   Mantener intactos los estados y acciones del gestor de consentimiento. */
@media (orientation: landscape) and (max-height: 600px) {
    body .cmplz-cookiebanner {
        zoom: 1 !important;
        --cmplz_text_font_size: 13px;
        --cmplz_text_line_height: 1.45;
        --cmplz_link_font_size: 12px;
        --cmplz_button_font_size: 13px;
        --cmplz_category_body_font_size: 13px;
        left: auto !important;
        top: auto !important;
        right: max(12px, env(safe-area-inset-right, 0px)) !important;
        bottom: max(10px, env(safe-area-inset-bottom, 0px)) !important;
        transform: none !important;
        width: min(600px, calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))) !important;
        min-width: 0 !important;
        height: auto !important;
        max-height: calc(100vh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
        max-height: calc(100dvh - 20px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
        display: flex;
        flex-direction: column;
        gap: 10px !important;
        padding: 14px 16px !important;
        overflow: hidden;
        border: 1px solid #e8e3ef;
        border-radius: 12px;
        box-shadow: 0 8px 32px #21104d26;
        font-family: inherit;
        -webkit-text-size-adjust: 100%;
    }
    body .cmplz-cookiebanner.cmplz-dismissed { display: none; }
    body .cmplz-cookiebanner .cmplz-header {
        flex: 0 0 auto;
        min-height: 20px;
        max-height: none !important;
        margin: 0 !important;
        grid-template-columns: 1fr auto 1fr;
    }
    body .cmplz-cookiebanner .cmplz-title { display: block; font-size: 14px; line-height: 1.4; }
    body .cmplz-cookiebanner .cmplz-body {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 0;
        width: 100%;
        max-height: none;
        margin: 0 !important;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }
    body .cmplz-cookiebanner .cmplz-message,
    body .cmplz-cookiebanner .cmplz-categories { width: 100%; }
    body .cmplz-cookiebanner .cmplz-message { margin: 0; font-size: 13px; line-height: 1.45; }
    body .cmplz-cookiebanner .cmplz-buttons {
        flex: 0 0 auto;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px !important;
    }
    body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
        zoom: 1 !important;
        flex: 1 1 140px;
        width: auto;
        height: auto !important;
        min-height: 44px !important;
        margin: 0;
        padding: 10px 12px !important;
        font-size: 13px !important;
        line-height: 20px !important;
        white-space: normal !important;
    }
    body .cmplz-cookiebanner .cmplz-documents,
    body .cmplz-cookiebanner .cmplz-information {
        zoom: 1 !important;
        flex: 0 0 auto;
        flex-wrap: wrap;
        gap: 6px 14px;
    }
    body .cmplz-cookiebanner .cmplz-documents ul { flex-wrap: wrap; }
    body .cmplz-cookiebanner .cmplz-links .cmplz-link { font-size: 12px; line-height: 1.5; }
    body .cmplz-cookiebanner .cmplz-close { zoom: 1 !important; }
}
