/* ══════════════════════════════════════════════
   Cookie Banner + Modal — Al Afandi
   ══════════════════════════════════════════════ */

/* ── Banner ── */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    background: var(--dark, #1a1a1a);
    border-top: 1px solid rgba(201,168,76,0.2);
    padding: 16px 24px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
    animation: cookieSlideUp .35s ease;
}

@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;
    color: #fff;
    font-size: .95rem;
    margin-bottom: 4px;
}
.cookie-banner-text p {
    color: rgba(255,255,255,0.65);
    font-size: .82rem;
    margin: 0;
    line-height: 1.5;
}
.cookie-banner-text a {
    color: var(--gold, #c9a84c);
    text-decoration: underline;
}

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

/* ── Botones ── */
.cookie-btn {
    padding: 9px 20px;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .15s;
    white-space: nowrap;
}
.cookie-btn-primary {
    background: var(--gold, #c9a84c);
    color: #111;
}
.cookie-btn-primary:hover { filter: brightness(1.1); }

.cookie-btn-outline {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.75);
}
.cookie-btn-outline:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* ── Modal ── */
.cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
}
.cookie-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,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: #1e1e1e;
    border-radius: 12px;
    border: 1px solid rgba(201,168,76,0.2);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

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

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

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

.cookie-always-active {
    font-size: .78rem;
    font-weight: 600;
    color: var(--gold, #c9a84c);
}

.cookie-category-desc {
    padding: 0 16px 14px;
    font-size: .8rem;
    color: rgba(255,255,255,0.5);
    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(255,255,255,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: #fff;
    border-radius: 50%;
    transition: transform .2s;
}
.cookie-toggle input:checked + .cookie-toggle-slider { background: var(--gold, #c9a84c); }
.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(255,255,255,0.08);
    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(255,255,255,0.3);
}
.cookie-modal-powered a { color: rgba(255,255,255,0.4); }

@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: 16px 16px 0 0; }
}