/* ===========================================================
   Cookie consent — Școala Hlipiceni
   Conform GDPR (UE 2016/679), ePrivacy, Legea RO 506/2004
   =========================================================== */

#cookie-banner {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 18px;
    max-width: 880px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .25);
    padding: 1.4rem 1.4rem 1.2rem;
    z-index: 1095;
    border: 1px solid #e2e8f0;
    transform: translateY(140%);
    transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}
#cookie-banner.visible {
    transform: translateY(0);
}
#cookie-banner h2 {
    font-size: 1.05rem;
    margin: 0 0 .35rem;
    color: #0f172a;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .5rem;
}
#cookie-banner h2 i {
    color: #0d6efd;
    font-size: 1.4rem;
}
#cookie-banner p {
    margin: 0 0 1rem;
    font-size: .92rem;
    color: #475569;
    line-height: 1.55;
}
#cookie-banner p a {
    color: #0d6efd;
    font-weight: 600;
    text-decoration: underline;
}
#cookie-banner .cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}
#cookie-banner .cookie-banner-actions .btn-cookie {
    padding: .55rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .88rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .18s ease;
}
#cookie-banner .btn-cookie-accept {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #fff;
    box-shadow: 0 6px 14px rgba(13, 110, 253, .25);
}
#cookie-banner .btn-cookie-accept:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(13, 110, 253, .35); }
#cookie-banner .btn-cookie-reject {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #e2e8f0;
}
#cookie-banner .btn-cookie-reject:hover { background: #e2e8f0; }
#cookie-banner .btn-cookie-customize {
    background: #fff;
    color: #0d6efd;
    border-color: #0d6efd;
}
#cookie-banner .btn-cookie-customize:hover { background: #eff6ff; }

@media (max-width: 575.98px) {
    #cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: 1rem; border-radius: 14px; }
    #cookie-banner .cookie-banner-actions { justify-content: stretch; }
    #cookie-banner .cookie-banner-actions .btn-cookie { flex: 1 1 auto; }
}

/* ----------- Modal preferințe ----------- */
#cookie-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    backdrop-filter: blur(2px);
}
#cookie-modal.visible { display: flex; }
#cookie-modal .cookie-modal-dialog {
    background: #fff;
    border-radius: 18px;
    max-width: 640px;
    width: 100%;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .4);
}
#cookie-modal .cookie-modal-header {
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#cookie-modal .cookie-modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}
#cookie-modal .cookie-modal-close {
    background: transparent;
    border: 0;
    color: #64748b;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
}
#cookie-modal .cookie-modal-body {
    padding: 1.2rem 1.4rem;
    overflow-y: auto;
    flex: 1;
}
#cookie-modal .cookie-modal-body > p {
    margin: 0 0 1rem;
    font-size: .9rem;
    color: #475569;
    line-height: 1.5;
}
.cookie-category {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: .75rem;
    transition: border-color .18s ease;
}
.cookie-category.is-on { border-color: #0d6efd; background: #f0f7ff; }
.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: .35rem;
}
.cookie-category-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}
.cookie-category-required {
    font-size: .72rem;
    color: #16a34a;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-left: .35rem;
}
.cookie-category-desc {
    margin: 0;
    font-size: .85rem;
    color: #64748b;
    line-height: 1.5;
}
/* switch toggle */
.cookie-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}
.cookie-switch input { opacity: 0; width: 0; height: 0; }
.cookie-switch .slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .18s ease;
}
.cookie-switch .slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .18s ease;
}
.cookie-switch input:checked + .slider { background: #0d6efd; }
.cookie-switch input:checked + .slider::before { transform: translateX(20px); }
.cookie-switch input:disabled + .slider { background: #16a34a; cursor: not-allowed; }
.cookie-switch input:disabled + .slider::before { transform: translateX(20px); }
#cookie-modal .cookie-modal-footer {
    padding: 1rem 1.4rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
    background: #f8fafc;
}
#cookie-modal .cookie-modal-footer .btn-cookie {
    padding: .55rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .88rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .18s ease;
}
#cookie-modal .btn-cookie-save {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: #fff;
    box-shadow: 0 6px 14px rgba(13, 110, 253, .25);
}
#cookie-modal .btn-cookie-save:hover { transform: translateY(-1px); }
#cookie-modal .btn-cookie-accept-all {
    background: #16a34a;
    color: #fff;
}
#cookie-modal .btn-cookie-accept-all:hover { background: #15803d; }
#cookie-modal .btn-cookie-reject-all {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #e2e8f0;
}
