/* =====================================================
   COOKIE BANNER — Impacto Home
   Integrado con el sistema de diseño oscuro/dorado
   ===================================================== */

/* ── Overlay de fondo ── */
#cookie-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#cookie-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

/* ── Banner principal ── */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;

    /* Glassmorphism oscuro con acento dorado */
    background:
        radial-gradient(ellipse at 50% 0%, rgba(200, 164, 107, 0.12), transparent 60%),
        linear-gradient(180deg, rgba(20, 20, 20, 0.97) 0%, rgba(11, 11, 11, 0.99) 100%);
    border-top: 1px solid rgba(200, 164, 107, 0.25);
    backdrop-filter: blur(28px) saturate(140%);
    -webkit-backdrop-filter: blur(28px) saturate(140%);
    box-shadow:
        0 -20px 70px rgba(0, 0, 0, 0.7),
        0 -1px 0 rgba(200, 164, 107, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    padding: 2rem 2.5rem;

    /* Animación de entrada desde abajo */
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.55s ease;
}

#cookie-banner.visible {
    transform: translateY(0);
    opacity: 1;
}

/* ── Layout interno ── */
.cookie-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem 3rem;
    align-items: center;
}

/* ── Bloque de texto ── */
.cookie-text-block {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.cookie-title-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.2rem;
}

.cookie-icon {
    font-size: 1.4rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(200, 164, 107, 0.5));
}

.cookie-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    font-weight: 700;
    color: #c8a46b;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin: 0;
}

.cookie-message {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.82rem, 1.4vw, 0.92rem);
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.6;
    max-width: 680px;
    margin: 0;
}

.cookie-message strong {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
}

/* ── Botones ── */
.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

.cookie-btn {
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 0.75rem 1.4rem;
    border-radius: 50px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition:
        background 0.28s ease,
        border-color 0.28s ease,
        transform 0.22s ease,
        box-shadow 0.28s ease;
    white-space: nowrap;
    line-height: 1;
}

/* Botón 1 — Esenciales */
.cookie-btn--essential {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.75);
}

.cookie-btn--essential:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Botón 2 — Aceptar todas (CTA dorado) */
.cookie-btn--accept {
    background: linear-gradient(135deg, #c8a46b 0%, #a6854d 100%);
    border-color: transparent;
    color: #0b0b0b;
    box-shadow:
        0 4px 18px rgba(200, 164, 107, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cookie-btn--accept:hover {
    background: linear-gradient(135deg, #d4b584 0%, #b89261 100%);
    transform: translateY(-2px);
    box-shadow:
        0 8px 28px rgba(200, 164, 107, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Botón 3 — Denegar todas */
.cookie-btn--deny {
    background: transparent;
    border-color: rgba(255, 100, 100, 0.25);
    color: rgba(255, 120, 120, 0.7);
}

.cookie-btn--deny:hover {
    background: rgba(255, 80, 80, 0.07);
    border-color: rgba(255, 100, 100, 0.5);
    color: rgba(255, 140, 140, 0.95);
    transform: translateY(-2px);
}

/* ── Badge de privacidad ── */
.cookie-privacy-note {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    color: rgba(200, 164, 107, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.85rem;
    margin-top: 0.2rem;
}

.cookie-privacy-note svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* ── Animación de salida ── */
#cookie-banner.hiding {
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
}

#cookie-overlay.hiding {
    opacity: 0;
    pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 820px) {
    #cookie-banner {
        padding: 1.5rem 1.25rem 1.75rem;
    }

    .cookie-inner {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .cookie-actions {
        width: 100%;
        justify-content: stretch;
    }

    .cookie-btn {
        flex: 1;
        text-align: center;
        padding: 0.85rem 0.8rem;
        font-size: 0.78rem;
    }

    .cookie-privacy-note {
        grid-column: 1;
    }
}

@media (max-width: 420px) {
    .cookie-actions {
        flex-direction: column;
        gap: 0.6rem;
    }

    .cookie-btn {
        width: 100%;
    }
}
