/* ============================================================
   PT_POSITIVA — Banner de cookies
   Añadir AL FINAL de assets/css/styles.css
   ============================================================ */

#cookieBanner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    background: #FFFEFA;
    border: 1px solid #E5D8DD;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0,0,0,.12);
    padding: 22px 24px;
    max-width: 880px;
    margin: 0 auto;
    display: none;
    font-family: 'Quicksand', system-ui, sans-serif;
    color: #4A3138;
    line-height: 1.55;
}
#cookieBanner.is-visible {
    display: block;
    animation: cookieBannerIn .35s ease both;
}

@keyframes cookieBannerIn {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

#cookieBanner h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: #2F2024;
}
#cookieBanner p {
    margin: 0 0 14px;
    font-size: 0.92rem;
}
#cookieBanner a {
    color: #E27289;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.cookie-btn {
    flex: 1 1 auto;
    min-width: 120px;
    padding: 11px 18px;
    border-radius: 30px;
    border: 2px solid #F5A8B8;
    background: #fff;
    color: #2F2024;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.cookie-btn:hover {
    background: #FBE4EB;
}
.cookie-btn--primary {
    background: #F5A8B8;
    color: #fff;
}
.cookie-btn--primary:hover {
    background: #E27289;
    border-color: #E27289;
}

/* ============== Modal de configuración ============== */
#cookieModal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(47, 32, 36, .55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#cookieModal.is-visible {
    display: flex;
}
.cookie-modal-card {
    background: #FFFEFA;
    border-radius: 18px;
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.cookie-modal-card h2 {
    font-family: 'Caveat', cursive;
    font-size: 1.9rem;
    color: #2F2024;
    margin: 0 0 14px;
}
.cookie-modal-card p {
    color: #4A3138;
    font-size: 0.95rem;
    margin: 0 0 18px;
}

.cookie-category {
    background: #FDF6F0;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
}
.cookie-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.cookie-category-head strong {
    color: #2F2024;
    font-size: 1rem;
}
.cookie-category p {
    margin: 0;
    font-size: 0.85rem;
    color: #6B4F5B;
    line-height: 1.5;
}

/* Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.cookie-switch input { opacity: 0; width: 0; height: 0; }
.cookie-slider {
    position: absolute;
    inset: 0;
    background: #D6CACE;
    border-radius: 24px;
    cursor: pointer;
    transition: .25s;
}
.cookie-slider::before {
    content: "";
    position: absolute;
    left: 3px; top: 3px;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: .25s;
}
.cookie-switch input:checked + .cookie-slider { background: #F5A8B8; }
.cookie-switch input:checked + .cookie-slider::before { transform: translateX(20px); }
.cookie-switch input:disabled + .cookie-slider { opacity: 0.6; cursor: not-allowed; }

.cookie-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

/* Botón flotante de reabrir el banner */
#cookieReopenBtn {
    background: none;
    border: none;
    color: #8B6772;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
#cookieReopenBtn:hover { color: #E27289; }

@media (max-width: 600px) {
    #cookieBanner { left: 10px; right: 10px; bottom: 10px; padding: 18px 18px; }
    .cookie-btn { width: 100%; flex: 1 1 100%; }
    .cookie-modal-card { padding: 22px 20px; }
}
