/* ==========================================================
   CHATPOLIS COOKIE CONSENT V2
   Toast compacto + botón flotante de galleta
   ========================================================== */


/* ----------------------------------------------------------
   SIN OVERLAY / SIN OSCURECER LA WEB
   ---------------------------------------------------------- */

.cp-cookie-overlay{
    display:none !important;
}


/* ----------------------------------------------------------
   BOTÓN FLOTANTE
   ---------------------------------------------------------- */

.cp-cookie-fab{
    position:fixed;
    right:18px;
    bottom:18px;
    z-index:9998;

    width:48px;
    height:48px;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:0;

    border:1px solid #e3e7ee;
    border-radius:50%;

    background:#ffffff;

    color:#1f2937;

    box-shadow:
        0 8px 22px rgba(15,23,42,.10),
        0 2px 6px rgba(15,23,42,.05);

    cursor:pointer;

    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease,
        background .18s ease;
}


.cp-cookie-fab:hover{
    transform:translateY(-2px) scale(1.03);

    border-color:#d5dce7;

    background:#fffaf3;

    box-shadow:
        0 12px 28px rgba(15,23,42,.14),
        0 3px 8px rgba(15,23,42,.06);
}


.cp-cookie-fab:active{
    transform:scale(.97);
}


.cp-cookie-fab-icon{
    display:block;

    font-size:23px;
    line-height:1;

    transform:translateY(1px);
}


.cp-cookie-fab-text{
    display:none !important;
}


/* ----------------------------------------------------------
   PANEL
   ---------------------------------------------------------- */

.cp-cookie-modal{
    position:fixed;

    right:18px;
    bottom:78px;

    left:auto;
    top:auto;

    z-index:10000;

    width:min(365px, calc(100vw - 28px));
    max-width:365px;

    padding:16px;

    background:#ffffff;

    border:1px solid #e4e8ef;
    border-radius:16px;

    color:#172033;

    box-shadow:
        0 22px 55px rgba(15,23,42,.14),
        0 6px 18px rgba(15,23,42,.06);

    transform:none;
}


/* ----------------------------------------------------------
   ANIMACIÓN DE ENTRADA
   ---------------------------------------------------------- */

.cp-cookie-modal:not([hidden]){
    animation:
        cpCookieEnter .28s
        cubic-bezier(.22,.8,.35,1)
        both;
}


@keyframes cpCookieEnter{

    from{
        opacity:0;
        transform:
            translateY(12px)
            scale(.975);
    }

    to{
        opacity:1;
        transform:
            translateY(0)
            scale(1);
    }

}


/* ----------------------------------------------------------
   CIERRE
   ---------------------------------------------------------- */

.cp-cookie-close{
    position:absolute;

    top:10px;
    right:10px;

    width:29px;
    height:29px;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:0;

    border:1px solid #dfe4eb;
    border-radius:8px;

    background:#f8fafc;

    color:#64748b;

    font-size:18px;
    font-weight:600;
    line-height:1;

    cursor:pointer;

    transition:
        background .16s ease,
        color .16s ease,
        border-color .16s ease;
}


.cp-cookie-close:hover{
    background:#eef2f6;
    color:#172033;
    border-color:#d3dae4;
}


/* ----------------------------------------------------------
   MARCA
   ---------------------------------------------------------- */

.cp-cookie-brand{
    display:flex;
    align-items:center;

    gap:9px;

    margin:0 36px 10px 0;
}


.cp-cookie-brand-mark{
    width:29px;
    height:29px;

    flex:0 0 auto;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:9px;

    background:
        linear-gradient(
            135deg,
            #536dfe,
            #7549ff
        );

    color:#fff;

    font-size:13px;
    font-weight:900;
}


.cp-cookie-brand-copy{
    display:flex;
    flex-direction:column;

    line-height:1.05;
}


.cp-cookie-brand-copy strong{
    font-size:12px;
    font-weight:900;
    letter-spacing:.015em;
}


.cp-cookie-brand-copy small{
    margin-top:3px;

    color:#8a95a7;

    font-size:9px;
}


/* ----------------------------------------------------------
   TÍTULO
   ---------------------------------------------------------- */

.cp-cookie-title{
    margin:0 0 8px;

    color:#172033;

    font-size:17px;
    font-weight:850;
    line-height:1.2;

    text-align:left;

    letter-spacing:-.015em;
}


/* ----------------------------------------------------------
   TEXTO
   ---------------------------------------------------------- */

.cp-cookie-text{
    margin:0 0 13px;

    color:#5f6d82;

    font-size:12.5px;
    line-height:1.55;
}


/* ----------------------------------------------------------
   BOTONES
   ---------------------------------------------------------- */

.cp-cookie-actions{
    display:grid;

    grid-template-columns:
        1fr
        1fr;

    gap:8px;

    margin:0 0 10px;
}


.cp-cookie-btn{
    min-height:39px;

    padding:8px 12px;

    border:0;
    border-radius:9px;

    font-size:13px;
    font-weight:800;

    cursor:pointer;

    transition:
        transform .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}


.cp-cookie-btn:hover{
    transform:translateY(-1px);
}


.cp-cookie-btn-primary{
    color:#fff;

    background:
        linear-gradient(
            135deg,
            #465df8,
            #6048f5
        );

    box-shadow:
        0 6px 13px
        rgba(70,93,248,.16);
}


.cp-cookie-btn-primary:hover{
    box-shadow:
        0 8px 17px
        rgba(70,93,248,.22);
}


.cp-cookie-btn-secondary{
    grid-column:1 / -1;

    min-height:37px;

    color:#455267;

    background:#f4f6f9;

    box-shadow:none;
}


.cp-cookie-btn-secondary:hover{
    background:#eceff4;
}


/* ----------------------------------------------------------
   PREFERENCIAS
   ---------------------------------------------------------- */

.cp-cookie-preferences{
    margin:0 0 10px;

    padding:12px;

    border:1px solid #e5e9ef;
    border-radius:12px;

    background:#f8fafc;
}


.cp-cookie-pref-item + .cp-cookie-pref-item{
    margin-top:10px;
    padding-top:10px;

    border-top:1px solid #e6eaf0;
}


.cp-cookie-pref-item label{
    display:flex;
    align-items:center;

    gap:8px;

    color:#263247;

    font-size:12px;
    font-weight:800;
}


.cp-cookie-pref-item input{
    width:15px;
    height:15px;

    accent-color:#536dfe;
}


.cp-cookie-pref-item p{
    margin:5px 0 0 23px;

    color:#718096;

    font-size:11px;
    line-height:1.45;
}


.cp-cookie-pref-actions{
    margin-top:12px;
}


.cp-cookie-pref-actions .cp-cookie-btn{
    width:100%;

    min-height:38px;

    font-size:12px;
}


/* ----------------------------------------------------------
   ENLACES LEGALES
   ---------------------------------------------------------- */

.cp-cookie-links{
    display:flex;
    flex-wrap:wrap;

    gap:7px 13px;

    margin-top:2px;
}


.cp-cookie-links a{
    color:#5064df;

    font-size:10.5px;
    font-weight:650;

    text-decoration:none;
}


.cp-cookie-links a:hover{
    text-decoration:underline;

    text-underline-offset:3px;
}


/* ----------------------------------------------------------
   BODY
   ---------------------------------------------------------- */

body.cp-cookie-open{
    overflow:auto !important;
}


/* ----------------------------------------------------------
   TABLET
   ---------------------------------------------------------- */

@media(max-width:900px){

    .cp-cookie-modal{
        right:14px;
        bottom:72px;

        width:min(
            350px,
            calc(100vw - 28px)
        );
    }

    .cp-cookie-fab{
        right:14px;
        bottom:14px;
    }

}


/* ----------------------------------------------------------
   MÓVIL
   ---------------------------------------------------------- */

@media(max-width:560px){

    .cp-cookie-modal{
        right:10px;
        bottom:68px;
        left:10px;

        width:auto;
        max-width:none;

        padding:14px;

        border-radius:15px;
    }


    .cp-cookie-brand{
        margin-bottom:9px;
    }


    .cp-cookie-title{
        font-size:16px;
    }


    .cp-cookie-text{
        font-size:12px;
        line-height:1.5;
    }


    .cp-cookie-actions{
        gap:7px;
    }


    .cp-cookie-btn{
        min-height:38px;

        font-size:12px;
    }


    .cp-cookie-links a{
        font-size:10px;
    }


    .cp-cookie-fab{
        right:10px;
        bottom:10px;

        width:46px;
        height:46px;
    }


    .cp-cookie-fab-icon{
        font-size:22px;
    }

}
