/* ══════════════════════════════════════════════
   Cookie Banner + Modal
   ══════════════════════════════════════════════ */

/* ── Banner ── */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    background: var(--cedar-deep);
    border-top: 1px solid rgba(196,154,74,0.25);
    padding: 16px 24px;
    box-shadow: 0 -4px 24px rgba(12,59,36,0.35);
    animation: cookieSlideUp .35s ease;
    font-family: var(--body);
}

@keyframes cookieSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 260px;
}
.cookie-banner-text strong {
    display: block;
    font-family: var(--display);
    color: var(--paper);
    font-size: .95rem;
    margin-bottom: 4px;
}
.cookie-banner-text p {
    color: rgba(251,248,240,0.85);
    font-size: .82rem;
    margin: 0;
    line-height: 1.5;
}
.cookie-banner-text a {
    color: var(--paper);
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ── Botones ── */
.cookie-btn {
    padding: 9px 20px;
    border-radius: 999px;
    font-family: var(--display);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .15s;
    white-space: nowrap;
}
.cookie-btn-primary {
    background: var(--red);
    color: var(--paper);
}
.cookie-btn-primary:hover { background: var(--red-deep); }

.cookie-btn-outline {
    background: transparent;
    border: 1.5px solid rgba(251,248,240,0.4);
    color: rgba(251,248,240,0.92);
}
.cookie-btn-outline:hover {
    background: rgba(251,248,240,0.08);
    color: var(--paper);
}

/* ── Modal ── */
.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
}
.cookie-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12,59,36,0.6);
    backdrop-filter: blur(3px);
}
.cookie-modal-box {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--cedar-deep);
    border-radius: var(--r);
    border: 1px solid rgba(196,154,74,0.25);
    box-shadow: var(--shadow-lg);
    font-family: var(--body);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 0;
}
.cookie-modal-header h3 {
    font-family: var(--display);
    color: var(--paper);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}
.cookie-modal-close {
    background: none;
    border: none;
    color: rgba(251,248,240,0.7);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background .15s;
}
.cookie-modal-close:hover { background: rgba(251,248,240,0.1); color: var(--paper); }

.cookie-modal-body {
    padding: 16px 24px;
}
.cookie-modal-body > p {
    color: rgba(251,248,240,0.82);
    font-size: .85rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ── Categorías ── */
.cookie-category {
    border: 1px solid rgba(251,248,240,0.12);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}
.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(251,248,240,0.04);
}
.cookie-category-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cookie-category-arrow {
    color: rgba(251,248,240,0.65);
    font-size: 1.1rem;
}
.cookie-category-info strong { font-family: var(--display); color: var(--paper); font-size: .9rem; }

.cookie-always-active {
    font-family: var(--display);
    font-size: .78rem;
    font-weight: 600;
    color: var(--paper);
}

.cookie-category-desc {
    padding: 0 16px 14px;
    font-size: .8rem;
    color: rgba(251,248,240,0.78);
    line-height: 1.6;
}

/* ── Toggle ── */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.cookie-toggle input { opacity: 0; width: 0; height: 0; }
.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(251,248,240,0.15);
    border-radius: 24px;
    cursor: pointer;
    transition: background .2s;
}
.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    left: 3px; top: 3px;
    background: var(--paper);
    border-radius: 50%;
    transition: transform .2s;
}
.cookie-toggle input:checked + .cookie-toggle-slider { background: var(--red); }
.cookie-toggle input:checked + .cookie-toggle-slider::before { transform: translateX(20px); }

/* ── Footer modal ── */
.cookie-modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid rgba(251,248,240,0.1);
    flex-wrap: wrap;
}
.cookie-modal-footer .cookie-btn { flex: 1; text-align: center; }

.cookie-modal-powered {
    text-align: center;
    padding: 10px 24px 16px;
    font-size: .75rem;
    color: rgba(251,248,240,0.5);
}
.cookie-modal-powered a { color: rgba(251,248,240,0.6); }

@media (max-width: 600px) {
    .cookie-banner-inner { flex-direction: column; align-items: stretch; }
    .cookie-banner-actions { justify-content: stretch; }
    .cookie-banner-actions .cookie-btn { flex: 1; text-align: center; }
    .cookie-modal-box { top: auto; bottom: 0; left: 0; right: 0; transform: none; width: 100%; max-height: 85vh; border-radius: var(--r) var(--r) 0 0; }
}