/* =========================================
   OVERLAY
========================================= */

#cookie-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.25);
    backdrop-filter:blur(2px);
    z-index:9998;
    opacity:0;
    visibility:hidden;
    transition:.4s ease;
}

#cookie-overlay.active{
    opacity:1;
    visibility:visible;
}

/* =========================================
   BANNER
========================================= */

#cookie-banner{
    position:fixed;
    left:50%;
    bottom:25px;
    transform:translateX(-50%) translateY(120%);
    width:calc(100% - 30px);
    max-width:80%;
    z-index:9999;
    transition:.6s cubic-bezier(.19,1,.22,1);
    font-family:'Inter',sans-serif;
}

#cookie-banner.active{
    transform:translateX(-50%) translateY(0);
}

.cookie-container{
    background:#ffffff;
    border-radius:26px;
    padding:30px 20px;
    box-shadow:
        0 20px 60px rgba(0,0,0,.12),
        0 4px 15px rgba(0,0,0,.06);
    border:1px solid #ececec;
}

/* =========================================
   TOP
========================================= */

.cookie-top{
    display:flex;
    gap:22px;
    align-items:flex-start;
}

.cookie-icon{
    min-width:70px;
    width:70px;
    height:70px;
    border-radius:22px;
    background:#f5f5f5;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:28px;
    color:#555;
}

.cookie-content h3{
    margin:0 0 10px;
    font-size:24px;
    color:#222;
    font-weight:700;
}

.cookie-content p{
    margin:0 0 15px;
    line-height:1.7;
    color:#666666;
    font-size:15px;
}

.cookie-content a{
    color:#111;
    font-weight:600;
    text-decoration:none;
    position:relative;
}

.cookie-content a::after{
    content:'';
    position:absolute;
    left:0;
    bottom:-2px;
    width:100%;
    height:1px;
    background:#111;
}

/* =========================================
   BOTONES
========================================= */

.cookie-actions{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
    margin-top:28px;
}

.btn-cookie{
    border:none;
    border-radius:16px;
    padding:14px 22px;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:.3s ease;
}

.btn-cookie-primary{
    background:#111;
    color:#fff;
}

.btn-cookie-primary:hover{
    transform:translateY(-2px);
    background:#000;
}

.btn-cookie-secondary{
    background:#f3f3f3;
    color:#444;
}

.btn-cookie-secondary:hover{
    background:#e7e7e7;
}

.btn-cookie-light{
    background:#fff;
    border:1px solid #ddd;
    color:#555;
}

.btn-cookie-light:hover{
    background:#fafafa;
}

/* =========================================
   SETTINGS
========================================= */

.cookie-settings{
    margin-top:28px;
    padding-top:25px;
    border-top:1px solid #ececec;
    display:none;
}

.cookie-settings.active{
    display:block;
}

.cookie-setting-item{
    display:flex;
    justify-content:space-between;
    gap:20px;
    margin-bottom:24px;
}

.cookie-setting-item h4{
    margin:0 0 5px;
    color:#222;
}

.cookie-setting-item p{
    margin:0;
    color:#777;
    font-size:14px;
}

/* =========================================
   SWITCH
========================================= */

.switch{
    position:relative;
    display:inline-block;
    width:58px;
    height:30px;
}

.switch input{
    opacity:0;
    width:0;
    height:0;
}

.slider{
    position:absolute;
    cursor:pointer;
    inset:0;
    background:#d9d9d9;
    transition:.4s;
    border-radius:50px;
}

.slider:before{
    position:absolute;
    content:"";
    height:22px;
    width:22px;
    left:4px;
    bottom:4px;
    background:white;
    transition:.4s;
    border-radius:50%;
}

input:checked + .slider{
    background:#111;
}

input:checked + .slider:before{
    transform:translateX(28px);
}

/* =========================================
   BOTÓN GUARDAR
========================================= */

.btn-save-preferences{
    margin-top:10px;
    border:none;
    background:#111;
    color:#fff;
    padding:14px 24px;
    border-radius:14px;
    font-weight:600;
    cursor:pointer;
    transition:.3s ease;
}

.btn-save-preferences:hover{
    transform:translateY(-2px);
}

/* =========================================
   RESPONSIVE
========================================= */

@media(max-width:768px){

    .cookie-top{
        flex-direction:column;
    }

    .cookie-actions{
        flex-direction:column;
    }

    .btn-cookie{
        width:100%;
    }

    .cookie-setting-item{
        flex-direction:column;
        align-items:flex-start;
    }

}

#openCookies{
    position:fixed;
    bottom:20px;
    left:20px;
    width:58px;
    height:58px;
    border:none;
    border-radius:50%;
    background:#111;
    color:#fff;
    font-size:21px;
    cursor:pointer;
    z-index:9997;
    display:none;
    align-items:center;
    justify-content:center;
    box-shadow:
        0 10px 30px rgba(0,0,0,.18);
    transition:.3s ease;
}

#openCookies:hover{
    transform:translateY(-3px) scale(1.05);
}