/* =========================================================
   PREMIUM COOKIE BANNER
   ========================================================= */

.cookie-banner {
    position: fixed;

    left: 24px;
    right: 24px;
    bottom: 20px;

    min-height: 88px;

    padding: 18px 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    background: rgba(255, 255, 255, 0.96);

    border: 1px solid rgba(37, 99, 235, 0.16);

    border-radius: 16px;

    box-shadow:
        0 20px 45px rgba(15, 40, 90, 0.12),
        0 4px 12px rgba(15, 40, 90, 0.06);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    z-index: 9999;

    color: #183153;

    font-family: inherit;

    animation: cookieSlideUp 0.45s ease-out;
}


/* =========================================================
   ANIMAZIONE
   ========================================================= */

@keyframes cookieSlideUp {

    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   TESTO
   ========================================================= */

.cookie-text {
    flex: 1;

    font-size: 15px;

    line-height: 1.6;

    color: #40516d;
}


/* Prima parte del testo */

.cookie-text span:first-child {
    color: #263b5a;
}


/* =========================================================
   LINK
   ========================================================= */

.cookie-text a {
    color: #2563eb;

    font-weight: 600;

    text-decoration: none;

    transition: all 0.2s ease;
}

.cookie-text a:hover {
    color: #174bb5;

    text-decoration: underline;

    text-underline-offset: 3px;
}


/* =========================================================
   SEPARATORI
   ========================================================= */

.cookie-separator {
    color: #7da5e8;

    margin: 0 7px;

    font-weight: 500;
}


/* =========================================================
   BOTTONI
   ========================================================= */

.cookie-buttons {
    display: flex;

    align-items: center;

    gap: 10px;

    flex-shrink: 0;
}


.cookie-buttons form {
    margin: 0;
}


/* =========================================================
   BASE BUTTON
   ========================================================= */

.cookie-btn {

    min-width: 94px;

    height: 48px;

    padding: 0 20px;

    border-radius: 10px;

    font-size: 15px;

    font-weight: 600;

    letter-spacing: 0.1px;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}


/* =========================================================
   RIFIUTA
   ========================================================= */

.cookie-reject {

    background: #ffffff;

    color: #29466f;

    border: 1px solid #c8d6eb;

    box-shadow:
        0 2px 5px rgba(20, 50, 100, 0.04);
}


.cookie-reject:hover {

    background: #f5f8fd;

    border-color: #9db7dc;

    color: #173a69;

    transform: translateY(-1px);

    box-shadow:
        0 5px 12px rgba(20, 50, 100, 0.08);
}


/* =========================================================
   ACCETTA
   ========================================================= */

.cookie-accept {

    position: relative;

    overflow: hidden;

    background: linear-gradient(
        135deg,
        #2563eb,
        #1d4ed8
    );

    color: #ffffff;

    border: 1px solid #2563eb;

    box-shadow:
        0 5px 14px rgba(37, 99, 235, 0.28);
}


.cookie-accept:hover {

    background: linear-gradient(
        135deg,
        #1d4ed8,
        #1e40af
    );

    border-color: #1d4ed8;

    transform: translateY(-1px);

    box-shadow:
        0 8px 20px rgba(37, 99, 235, 0.34);
}


/* Effetto luce sul bottone */

.cookie-accept::before {

    content: "";

    position: absolute;

    top: 0;
    left: -100%;

    width: 60%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.20),
        transparent
    );

    transition: left 0.5s ease;
}


.cookie-accept:hover::before {
    left: 130%;
}


/* =========================================================
   FOCUS ACCESSIBILITY
   ========================================================= */

.cookie-btn:focus-visible {

    outline: 3px solid rgba(37, 99, 235, 0.25);

    outline-offset: 3px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 768px) {

    .cookie-banner {

        left: 15px;
        right: 15px;
        bottom: 15px;

        flex-direction: column;

        align-items: stretch;

        gap: 15px;

        padding: 18px;

        border-radius: 15px;
    }


    .cookie-buttons {

        justify-content: flex-end;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .cookie-banner {

        left: 10px;
        right: 10px;
        bottom: 10px;

        padding: 17px;

        border-radius: 14px;
    }


    .cookie-text {

        font-size: 14px;

        line-height: 1.55;
    }


    .cookie-buttons {

        display: grid;

        grid-template-columns: 1fr 1fr;

        width: 100%;
    }


    .cookie-btn {

        width: 100%;

        min-width: 0;

        height: 46px;
    }
}
