/* ==========================================================================
   Normify - Footer legale + Cookie banner globali (iniettati via gdpr.js)
   ========================================================================== */

/* ---------- Footer legale ---------- */
.ngdpr-footer {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0f172a;
    color: #cbd5e1;
    padding: 1.1rem 1.5rem;
    font-size: 0.85rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Aggancio in basso quando il body e un contenitore flex/grid (es. login) */
.ngdpr-footer--fixed {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 50;
}

.ngdpr-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem 1rem;
}

.ngdpr-footer a,
.ngdpr-footer button.ngdpr-link {
    color: #cbd5e1;
    text-decoration: none;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.ngdpr-footer a:hover,
.ngdpr-footer button.ngdpr-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.ngdpr-footer-sep {
    opacity: 0.4;
}

.ngdpr-footer-copy {
    width: 100%;
    color: #94a3b8;
    margin-top: 0.35rem;
}

/* ---------- Cookie banner ---------- */
.ngdpr-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 99999;
    max-width: 920px;
    margin: 0 auto;
    background: #ffffff;
    color: #1e293b;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    border: 1px solid #e2e8f0;
    padding: 1.5rem 1.75rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    animation: ngdpr-slide-up 0.35s ease;
}

@keyframes ngdpr-slide-up {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.ngdpr-banner h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.ngdpr-banner p {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #475569;
}

.ngdpr-banner p a {
    color: #6366f1;
    text-decoration: underline;
}

.ngdpr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.ngdpr-btn {
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ngdpr-btn-primary {
    background: #6366f1;
    color: #ffffff;
}
.ngdpr-btn-primary:hover { background: #4f46e5; }

.ngdpr-btn-secondary {
    background: #ffffff;
    color: #334155;
    border-color: #cbd5e1;
}
.ngdpr-btn-secondary:hover { background: #f1f5f9; }

.ngdpr-btn-link {
    background: none;
    color: #6366f1;
    border: none;
    padding: 0.65rem 0.5rem;
}
.ngdpr-btn-link:hover { text-decoration: underline; }

/* ---------- Pannello preferenze ---------- */
.ngdpr-prefs {
    display: none;
    margin-top: 1rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}
.ngdpr-prefs.open { display: block; }

.ngdpr-cat {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.ngdpr-cat:last-child { border-bottom: none; }

.ngdpr-cat-info strong {
    display: block;
    font-size: 0.92rem;
    color: #0f172a;
}
.ngdpr-cat-info span {
    font-size: 0.82rem;
    color: #64748b;
}

/* Toggle */
.ngdpr-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.ngdpr-switch input { opacity: 0; width: 0; height: 0; }
.ngdpr-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: 0.2s;
}
.ngdpr-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: 0.2s;
}
.ngdpr-switch input:checked + .ngdpr-slider { background: #6366f1; }
.ngdpr-switch input:checked + .ngdpr-slider:before { transform: translateX(20px); }
.ngdpr-switch input:disabled + .ngdpr-slider { background: #a5b4fc; cursor: not-allowed; }

/* Overlay leggero per attirare attenzione al primo accesso */
.ngdpr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 99998;
}

@media (max-width: 560px) {
    .ngdpr-actions { flex-direction: column; }
    .ngdpr-btn { width: 100%; }
}
