/* =============================================
   CAFINCASA – cookie-consent.css
   Banner cookie & pulsante preferenze
   ============================================= */

/* ── Banner principale ───────────────────────── */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    padding: 0 1rem 1rem;
    pointer-events: none;

    /* Transizione entrata/uscita */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

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

#cookie-banner.cb-hiding {
    opacity: 0;
    transform: translateY(30px);
}

.cb-inner {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: #1f2937;
    color: #f3f4f6;
    border-radius: 18px 18px 0 0;
    padding: 1.4rem 1.8rem;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.35);
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    border-top: 3px solid #10b981;
}

.cb-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
}

.cb-text {
    flex: 1;
    min-width: 220px;
}

.cb-text strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: white;
}

.cb-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #d1d5db;
    line-height: 1.55;
}

.cb-text a {
    color: #6ee7b7;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cb-text a:hover {
    color: #10b981;
}

.cb-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ── Bottoni ──────────────────────────────────── */
.cb-btn {
    border: none;
    border-radius: 50px;
    padding: 0.6rem 1.4rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.cb-btn-accept {
    background: #10b981;
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.cb-btn-accept:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.55);
}

.cb-btn-outline {
    background: transparent;
    color: #d1d5db;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.cb-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

/* ── Pulsante flottante preferenze ──────────────── */
#cb-pref-btn {
    position: fixed;
    bottom: 90px;   /* sopra il bottone WhatsApp */
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1f2937;
    border: 2px solid #374151;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 1035;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.25s ease;
    line-height: 1;
}

#cb-pref-btn:hover {
    background: #374151;
    transform: scale(1.1);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4);
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 767px) {
    #cookie-banner {
        padding: 0;
    }

    .cb-inner {
        border-radius: 14px 14px 0 0;
        padding: 1.2rem 1.2rem 1rem;
        gap: 0.9rem;
    }

    .cb-icon {
        display: none; /* nasconde l'emoji su mobile per risparmiare spazio */
    }

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

    .cb-btn {
        flex: 1;
        text-align: center;
        padding: 0.65rem 0.75rem;
    }
}

@media (max-width: 400px) {
    .cb-text p {
        font-size: 0.8rem;
    }

    .cb-actions {
        flex-direction: column;
    }

    #cb-pref-btn {
        bottom: 80px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}
