/**
 * Cookie Banner Custom Styles
 * Personalizzazione cookieconsent per IREN Collabora
 * @version 1.1
 */

/* ========================================
   Banner Principale - Ombra elegante
   ======================================== */

.cc-window {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
                0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* ========================================
   Badge Revoke - FAB Style (Simple)
   ======================================== */

.cc-revoke {
    /* FAB circolare - espandibile */
    width: 56px !important;
    height: 56px !important;
    border-radius: 28px !important;
    padding: 0 !important;

    /* Posizionamento - stesso del banner */
    position: fixed !important;
    bottom: 1rem !important;
    left: 1rem !important;
    z-index: 9999 !important;

    /* Colori */
    /*background-color: #00a651 !important;*/

    /* Ombra pronunciata */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2),
                0 6px 20px rgba(0, 0, 0, 0.15) !important;

    /* Transizioni fluide senza delay (gestito da JS) */
    transition: all 0.4s ease-in-out !important;

    /* Centra contenuto */
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding-left: 0 !important;

    /* Testo */
    font-size: 0 !important;
    line-height: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-decoration: none !important;
}

/* Nascondi FAB quando il banner è visibile */
.cc-window.cc-banner + .cc-revoke,
body:has(.cc-window:not(.cc-invisible)) .cc-revoke {
    display: none !important;
}

/* Icona Cookie SVG Custom - Stile Realistico con Morso */
.cc-revoke::before {
    content: "" !important;
    width: 28px !important;
    height: 28px !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M21.598 11.064a1.006 1.006 0 0 0-.854-.172A2.938 2.938 0 0 1 20 11c-1.654 0-3-1.346-3.003-2.938.005-.034.016-.134.017-.168a.998.998 0 0 0-1.254-1.006A3.002 3.002 0 0 1 15 7c-1.654 0-3-1.346-3-3 0-.217.031-.444.099-.716a1 1 0 0 0-1.067-1.236A9.956 9.956 0 0 0 2 12c0 5.514 4.486 10 10 10s10-4.486 10-10c0-.049-.003-.097-.007-.16a1.004 1.004 0 0 0-.395-.776zM8.5 6a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm-2 8a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm3 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm2.5-6.5a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0zm3.5 6.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/></svg>') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    flex-shrink: 0 !important;
    margin-left: 14px !important;
}

/* Testo Label */
.cc-revoke::after {
    content: "Preferenze Cookie" !important;
    color: white !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    margin-left: 12px !important;
    margin-right: 16px !important;
    opacity: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
    transition: all 0.4s ease-in-out !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

/* Espansione con classe (aggiunta da JS dopo 1s di hover) */
.cc-revoke.cc-revoke-expanded {
    width: auto !important;
    min-width: 200px !important;
    padding-right: 16px !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25),
                0 8px 24px rgba(0, 0, 0, 0.2) !important;
    text-decoration: none !important;
    /*background-color: #009648 !important;*/
}

.cc-revoke.cc-revoke-expanded::after {
    opacity: 1 !important;
    max-width: 200px !important;
}

.cc-revoke:focus {
    outline: none !important;
    text-decoration: none !important;
}

/* Mobile */
@media (max-width: 768px) {
    .cc-revoke {
        width: 48px !important;
        height: 48px !important;
        /* Stessi margini del banner su mobile */
        bottom: 0.5em !important;
        left: 0.5em !important;
    }

    .cc-revoke::before {
        width: 24px !important;
        height: 24px !important;
        margin-left: 12px !important;
    }

    .cc-revoke::after {
        font-size: 13px !important;
        margin-left: 10px !important;
        margin-right: 12px !important;
    }

    .cc-revoke:hover {
        min-width: 180px !important;
    }

    /* Banner più vicino ai bordi su mobile */
    .cc-window {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12),
                    0 1px 3px rgba(0, 0, 0, 0.08) !important;
    }
}
