#acc-cookie-wrapper { font-family: system-ui, -apple-system, Roboto, sans-serif; color: var(--acc-text); }
.acc-hidden { display: none !important; }

/* --- FONDOS BLOQUEANTES (Para todos los layouts) --- */
.acc-layout-floating, .acc-layout-centered, .acc-layout-bar {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(5px);
    z-index: 999999;
}

/* --- 1. BANNER FLOTANTE (Esquina Derecha) --- */
.acc-layout-floating .acc-banner-content {
    position: absolute; bottom: 24px; right: 24px; /* Alineado a la derecha */
    background: var(--acc-bg); box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-radius: 14px; padding: 25px; max-width: 420px; width: calc(100% - 48px);
    display: flex; flex-direction: column; gap: 12px;
}
.acc-layout-floating .acc-header-area { flex-direction: column; align-items: flex-start; gap: 12px; }
.acc-layout-floating .acc-buttons { flex-direction: column; }

/* --- 2. MODAL CENTRADO --- */
.acc-layout-centered { display: flex; align-items: center; justify-content: center; padding: 20px; }
.acc-layout-centered .acc-banner-content {
    background: var(--acc-bg); padding: 35px 40px; border-radius: 18px;
    max-width: 550px; width: 100%; box-shadow: 0 25px 50px rgba(0,0,0,0.3); text-align: center;
}
.acc-layout-centered .acc-header-area { flex-direction: column; align-items: center; justify-content: center; gap: 15px; margin-bottom: 20px; }
.acc-layout-centered .acc-buttons { justify-content: center; margin-top: 20px; }

/* --- 3. BARRA INFERIOR HORIZONTAL --- */
.acc-layout-bar .acc-banner-content {
    position: absolute; bottom: 0; left: 0; right: 0; width: 100%;
    background: var(--acc-bg); box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    padding: 20px 40px; display: flex; align-items: center; justify-content: space-between; gap: 30px;
    border-top-width: 6px !important; /* Más fina en la barra */
}
.acc-layout-bar .acc-header-area { display: none; } /* Ocultamos logo superior en barra para mantenerla limpia */
.acc-layout-bar .acc-text-area { flex: 1; }
.acc-layout-bar .acc-text-area h2 { font-size: 18px; margin-bottom: 6px; }
.acc-layout-bar .acc-text-area p { font-size: 13px; margin: 0; }
.acc-layout-bar .acc-buttons { flex-direction: row; width: auto; flex-wrap: nowrap; margin-top: 0; }

/* --- COMPONENTES GENERALES --- */
.acc-header-area { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 12px; }
.acc-logo { max-height: 75px; object-fit: contain; } /* LOGO MÁS GRANDE */
.acc-lang-selector { padding: 6px 12px; border-radius: 6px; border: 1px solid #e2e8f0; background: #f8fafc; font-weight: 600; cursor: pointer; color: var(--acc-text); font-size: 13px; outline: none; }
.acc-text-area h2 { margin: 0 0 10px 0; color: var(--acc-text); line-height: 1.2; font-size: 20px; }
.acc-text-area p { margin: 0; font-size: 14px; line-height: 1.5; opacity: 0.85; }

/* --- BOTONES --- */
.acc-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; width: 100%; }
.acc-btn { padding: 12px 22px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s ease; flex: 1 1 auto; text-align: center; outline: none !important; margin: 0; width: 100%; white-space: nowrap; }
.acc-layout-centered .acc-btn, .acc-layout-bar .acc-btn { width: auto; }
.acc-btn-primary { background-color: var(--acc-primary); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.acc-btn-secondary { background-color: #f1f5f9; color: #475569; }

/* AEPD: Clase de Rechazar igual de prominente visualmente (Fondo Sólido Oscuro) */
.acc-btn-reject-style { background-color: #334155; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.acc-btn:focus { box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.4) !important; }
.acc-btn-primary:focus { box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2) !important; }
.acc-btn-reject-style:focus { box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.4) !important; }

@media (hover: hover) and (pointer: fine) {
    .acc-btn-primary:hover { filter: brightness(90%); transform: translateY(-1px); }
    .acc-btn-reject-style:hover { filter: brightness(120%); transform: translateY(-1px); }
    .acc-btn-secondary:hover { background-color: #e2e8f0; color: #0f172a; }
    .acc-cookie-option:hover { background: #f8fafc; }
    #acc-btn-modal-close:hover { opacity: 0.6; }
}
.acc-btn-primary:active, .acc-btn-reject-style:active { transform: translateY(1px); filter: brightness(85%); }
.acc-btn-secondary:active { background-color: #cbd5e1; }

/* --- MODAL DE AJUSTES --- */
#acc-cookie-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(6px); z-index: 9999999; display: flex; align-items: center; justify-content: center; padding: 15px; }

/* CSS OVERSCROLL: Previene que la pantalla baje detrás del modal en mobile */
.acc-modal-content { overscroll-behavior: contain; background: var(--acc-bg); padding: 40px; border-radius: 16px; max-width: 600px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 20px 40px rgba(0,0,0,0.3); } /* MÁS AIRE (Padding general) */

.acc-modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f1f5f9; padding-bottom: 25px; margin-bottom: 25px;} /* MÁS AIRE */
.acc-cookie-option { display: flex; justify-content: space-between; align-items: flex-start; gap:20px; padding: 24px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: 15px; transition: background 0.3s; } /* MÁS AIRE (Padding y Margen) */
.acc-toggle-text { flex: 1; }
.acc-toggle-text strong { display: block; font-size: 15px; color: var(--acc-text); margin-bottom: 6px; }
.acc-toggle-text span { display: block; font-size: 13px; color: #64748b; line-height: 1.5; }
.acc-toggle-text em { font-size: 11px; opacity: 0.7; }

.acc-switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; margin-top: 4px;}
.acc-switch input { opacity: 0; width: 0; height: 0; }
.acc-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; transition: .4s; border-radius: 34px; }
.acc-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
.acc-switch input:checked + .acc-slider { background-color: var(--acc-primary); }
.acc-switch input:checked + .acc-slider:before { transform: translateX(22px); }
.acc-switch input:disabled + .acc-slider { opacity: 0.5; cursor: not-allowed; }

.acc-modal-actions { display: flex; gap: 12px; margin-top: 30px; justify-content: flex-end; } /* MÁS AIRE */
input[type="checkbox"]:focus-visible + .acc-slider, .acc-lang-selector:focus-visible, #acc-btn-modal-close:focus-visible { outline: 2px solid var(--acc-focus) !important; outline-offset: 2px; }

/* --- MOBILE: FORZAR TODOS LOS LAYOUTS A COMPORTARSE COMO MODAL CENTRADO --- */
@media (max-width: 768px) {
    .acc-layout-floating, .acc-layout-bar { display: flex; align-items: center; justify-content: center; padding: 20px; }
    
    .acc-layout-floating .acc-banner-content, 
    .acc-layout-bar .acc-banner-content {
        position: relative; bottom: auto; left: auto; right: auto;
        max-width: 550px; width: 100%; border-radius: 18px; padding: 35px 20px;
        text-align: center; flex-direction: column; box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    }
    
    .acc-layout-floating .acc-header-area, 
    .acc-layout-bar .acc-header-area { 
        display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 15px; margin-bottom: 20px; 
    }
    
    .acc-layout-bar .acc-text-area h2 { font-size: 20px; }
    .acc-layout-bar .acc-text-area p { font-size: 14px; }
    
    .acc-buttons, .acc-layout-bar .acc-buttons { flex-direction: column; width: 100%; justify-content: center; margin-top: 20px; }
    .acc-btn, .acc-layout-centered .acc-btn, .acc-layout-bar .acc-btn { width: 100%; padding: 14px; }
    .acc-layout-centered .acc-banner-content { padding: 35px 20px; }
}