/* ==========================================================================
   ILLAN PRO - ESTILOS DEL BANNER RGPD Y VISTAS LEGALES ADAPTATIVAS (V.7.1)
   Ubicación: /var/ecosystem/kernel/CoreEngines/EnginePrivacidad/assets/css/cookie-banner.css
   URL Pública: /assets/core-engines/EnginePrivacidad/css/cookie-banner.css
   Cumplimiento: 100% Variables Root UI, lectura en Espacio Izquierdo (Invitados)
                 y App Shell (Miembros), respetando el footer fijo inferior.
   ========================================================================== */

.cookie-banner-container {
    position: fixed;
    bottom: var(--footer-clearance);
    left: 0;
    width: 100%;
    background-color: transparent;
    z-index: var(--z-modal);
    padding: var(--spacing-box-mobile);
}

body.is-guest-mode .cookie-banner-container {
    bottom: var(--footer-clearance);
}

.cookie-banner-content {
    max-width: var(--container-lg);
    margin: 0 auto;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--box-radius);
    padding: var(--spacing-box);
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .cookie-banner-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .cookie-banner-text {
        flex: 1;
        padding-right: 2rem;
    }
}

.cookie-banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.cookie-title-element {
    color: var(--color-text-title);
    font-size: var(--size-h4-title);
    margin-bottom: 0.5rem;
    font-family: var(--font-title);
}

.cookie-desc-element {
    color: var(--color-text-main);
    font-size: var(--size-h7-title);
    line-height: 1.5;
    margin: 0;
}

.cookie-link-element {
    color: var(--color-link-general-text);
}

/* ==========================================================================
   MODAL DE CONFIGURACIÓN (GLASSMORPHISM ESTRICTO)
   ========================================================================== */

.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    z-index: var(--z-loader);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-box-mobile);
}

.cookie-modal-box {
    width: 100%;
    max-width: var(--container-sm);
    background: var(--glass-bg-medium);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--box-radius);
    padding: var(--spacing-box);
    box-shadow: var(--box-shadow);
}

.cookie-modal-title {
    color: var(--color-text-title);
    font-size: var(--size-h3-title);
    margin-bottom: 1rem;
    font-family: var(--font-title);
}

.cookie-modal-desc {
    color: var(--color-text-muted);
    font-size: var(--size-h7-title);
    margin-bottom: 2rem;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.cookie-option:last-child {
    border-bottom: none;
}

.cookie-option-info {
    flex: 1;
    padding-right: 1rem;
}

.cookie-strong-text {
    color: var(--color-text-main);
}

.cookie-span-text {
    display: block;
    font-size: var(--size-h8-title);
    color: var(--color-text-muted);
}

.cookie-modal-footer {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ==========================================================================
   DISEÑO DE OPCIONES TIPO TOGGLE (SWITCH)
   ========================================================================== */

.cookie-option-toggle input[type="checkbox"] {
    appearance: none;
    width: 44px;
    height: 24px;
    background: var(--form-bg);
    border: 1px solid var(--form-border);
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
}

.cookie-option-toggle input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--color-text-main);
    border-radius: 50%;
    transition: transform 0.3s;
}

.cookie-option-toggle input[type="checkbox"]:checked {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.cookie-option-toggle input[type="checkbox"]:checked::after {
    transform: translateX(20px);
    background: var(--color-text-title);
}

.cookie-option-toggle input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   ESTILOS DE LAS VISTAS LEGALES (MIEMBROS APP SHELL + INVITADOS ESPACIO 1)
   ========================================================================== */

.legal-view-container {
    padding-top: var(--header-clearance);
    padding-bottom: var(--footer-clearance);
}

.legal-view-wrapper-lg {
    max-width: var(--container-lg);
    margin: 0 auto;
    padding: 0 var(--spacing-box-mobile);
}

.legal-view-wrapper-public {
    max-width: var(--container-wrapper-public);
    margin: 0 auto;
    padding: 0 var(--spacing-box-mobile);
}

/* Escenario de lectura legal dentro del Espacio Izquierdo (#guest-main-layer) */
.legal-guest-stage {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: var(--spacing-box);
    box-sizing: border-box;
}

.legal-guest-container {
    width: 100%;
    max-width: var(--container-md);
    margin: 0 auto;
}

.legal-guest-card {
    width: 100%;
}

.legal-guest-nav {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.legal-quick-switch {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.legal-switch-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: var(--size-h7-title);
    font-weight: 500;
    transition: var(--button-transition);
}

.legal-switch-link:hover {
    color: var(--color-primary);
}

.legal-switch-sep {
    color: var(--color-text-muted);
    font-size: var(--size-h8-title);
}

.legal-header-center {
    text-align: center;
    margin-bottom: var(--spacing-section);
}

.legal-header-left {
    margin-bottom: var(--spacing-box-mobile);
}

.legal-title-h1 {
    color: var(--color-text-title);
    font-size: var(--size-h1-title);
    font-family: var(--font-title);
    margin-bottom: 1rem;
}

.legal-title-h1-compact {
    color: var(--color-text-title);
    font-size: var(--size-h2-title);
    font-family: var(--font-title);
    margin-top: 0.25rem;
    margin-bottom: 0.35rem;
}

.legal-subtitle {
    color: var(--color-text-muted);
    font-size: var(--size-general-text);
}

.legal-meta {
    color: var(--color-text-muted);
    font-size: var(--size-h7-title);
}

.legal-back-link {
    color: var(--color-link-general-text);
    text-decoration: none;
    font-size: var(--size-h7-title);
    font-weight: 600;
    transition: var(--button-transition);
}

.legal-back-link:hover {
    color: var(--color-text-title);
    text-decoration: underline;
}

.legal-content-body {
    color: var(--color-text-main);
    font-size: var(--size-general-text);
    line-height: 1.75;
}

.legal-content-body h2 {
    color: var(--color-text-title);
    font-size: var(--size-h4-title);
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
    border-bottom: none;
    padding-bottom: 0;
}

.legal-content-body ul {
    padding-left: 1.25rem;
    margin: 0.75rem 0;
}

.legal-action-area {
    margin-top: 1.5rem;
}

@media (max-width: 1024px) {
    .legal-guest-stage {
        padding: var(--spacing-box-mobile);
        padding-bottom: calc(var(--footer-clearance) + var(--spacing-box));
    }
}