/* ════════════════════
   AVISO DE COOKIES PROPIO DE RiskIAs
   Sin dependencias externas. Usa los colores de marca
   definidos en styles.css (:root).
════════════════════ */

/* ─── Banner inferior ─── */
.ck-banner {
    position: fixed; z-index: 4000;
    left: 16px; right: 16px; bottom: 16px;
    max-width: 1120px; margin: 0 auto;
    background: linear-gradient(150deg, #16283a 0%, #0D1B2A 100%);
    color: rgba(255,255,255,.82);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: 0 24px 60px rgba(0,0,0,.42);
    display: grid; gap: 18px;
    transform: translateY(140%);
    transition: transform .45s cubic-bezier(.4,0,.2,1);
}
.ck-banner.ck-show { transform: translateY(0); }
@media (min-width: 900px) {
    .ck-banner { grid-template-columns: 1fr auto; align-items: center; gap: 28px; padding: 24px 28px; }
}

.ck-title {
    font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.05rem;
    color: #fff; margin-bottom: 6px;
    display: flex; align-items: center; gap: 9px;
}
.ck-title svg { color: #3D8EFF; flex-shrink: 0; }
.ck-text { font-size: .88rem; line-height: 1.55; }
.ck-text a { color: #3D8EFF; text-decoration: underline; text-underline-offset: 2px; }
.ck-text a:hover { color: #fff; }

.ck-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 899px) { .ck-actions > * { flex: 1 1 100%; } }

/* Los tres botones tienen el mismo peso visual: rechazar debe costar
   lo mismo que aceptar (requisito de la AEPD). */
.ck-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 22px; border-radius: 50px; cursor: pointer;
    font-family: 'Inter', sans-serif; font-weight: 600; font-size: .88rem;
    white-space: nowrap; min-height: 46px; border: 1px solid transparent;
    transition: background .22s, border-color .22s, transform .18s, color .22s;
}
.ck-btn:hover { transform: translateY(-2px); }
.ck-btn-accept { background: #0066FF; color: #fff; box-shadow: 0 8px 22px rgba(0,102,255,.34); }
.ck-btn-accept:hover { background: #0a5ce0; }
.ck-btn-reject { background: rgba(255,255,255,.10); color: #fff; border-color: rgba(255,255,255,.24); }
.ck-btn-reject:hover { background: rgba(255,255,255,.18); }
.ck-btn-config { background: transparent; color: rgba(255,255,255,.75); border-color: rgba(255,255,255,.20); }
.ck-btn-config:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ─── Ventana de preferencias ─── */
.ck-overlay {
    position: fixed; inset: 0; z-index: 4100;
    background: rgba(8,15,24,.72);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    display: grid; place-items: center; padding: 20px;
    opacity: 0; pointer-events: none; transition: opacity .3s;
}
.ck-overlay.ck-show { opacity: 1; pointer-events: auto; }

.ck-modal {
    width: 100%; max-width: 580px; max-height: 86vh; overflow-y: auto;
    background: #fff; color: #1A1A2E;
    border-radius: 20px; padding: 28px 24px;
    box-shadow: 0 30px 70px rgba(0,0,0,.35);
    transform: translateY(18px) scale(.98); transition: transform .3s;
}
.ck-overlay.ck-show .ck-modal { transform: translateY(0) scale(1); }
@media (min-width: 620px) { .ck-modal { padding: 32px; } }

.ck-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.ck-modal h2 { font-family: 'Outfit', sans-serif; font-size: 1.35rem; font-weight: 800; color: #0D1B2A; }
.ck-modal-intro { font-size: .9rem; color: #6B7280; margin-bottom: 22px; line-height: 1.55; }
.ck-close {
    background: none; border: none; cursor: pointer; color: #9CA3AF;
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    flex-shrink: 0; transition: background .2s, color .2s;
}
.ck-close:hover { background: #EFEFEF; color: #1A1A2E; }

.ck-cat {
    border: 1px solid #E4E7EC; border-radius: 14px;
    padding: 16px 18px; margin-bottom: 12px;
    transition: border-color .22s;
}
.ck-cat:hover { border-color: #CBD5E1; }
.ck-cat-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ck-cat-name { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1rem; color: #0D1B2A; }
.ck-cat-desc { font-size: .84rem; color: #6B7280; margin-top: 7px; line-height: 1.5; }
.ck-always { font-size: .74rem; font-weight: 800; color: #00B87A; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }

/* Interruptor */
.ck-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.ck-switch input { opacity: 0; width: 0; height: 0; }
.ck-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #CBD5E1; border-radius: 34px; transition: background .25s;
}
.ck-slider::before {
    content: ''; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%; transition: transform .25s;
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.ck-switch input:checked + .ck-slider { background: #0066FF; }
.ck-switch input:checked + .ck-slider::before { transform: translateX(20px); }
.ck-switch input:focus-visible + .ck-slider { outline: 3px solid rgba(0,102,255,.3); outline-offset: 2px; }

.ck-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ck-modal-actions .ck-btn { flex: 1 1 160px; }
.ck-modal-actions .ck-btn-reject { background: #F8F9FA; color: #1A1A2E; border-color: #E4E7EC; }
.ck-modal-actions .ck-btn-reject:hover { background: #EFEFEF; }
.ck-modal-actions .ck-btn-config { background: #fff; color: #1A1A2E; border-color: #E4E7EC; }
.ck-modal-actions .ck-btn-config:hover { background: #F8F9FA; }
.ck-modal-foot { margin-top: 16px; font-size: .78rem; color: #9CA3AF; text-align: center; }
.ck-modal-foot a { color: #0066FF; text-decoration: none; }
.ck-modal-foot a:hover { text-decoration: underline; }

/* Enlace del pie para reabrir la configuración */
.ck-reopen { background: none; border: none; cursor: pointer; font: inherit; padding: 5px 0; color: inherit; text-align: left; }

@media (prefers-reduced-motion: reduce) {
    .ck-banner, .ck-overlay, .ck-modal, .ck-btn, .ck-slider, .ck-slider::before { transition: none !important; }
}
