/* public/css/base.css - STILE GLOBALE + MODALI + COOKIE */

:root {
    --sidebar-width: 260px;
    --sidebar-mini-width: 70px;
    --primary-blue: #3b82f6;
    --danger-red: #ef4444;
    --bg-light: #f8fafc;
    --phase-gold: #d4af37; /* Aggiunto colore brand */
    --phase-dark: #0f172a;
}

body { 
    font-family: 'Inter', sans-serif; 
    margin: 0; padding: 0; 
    background-color: var(--bg-light);
    color: #1e293b;
    overflow-x: hidden;
}

/* =========================================
   1. STRUTTURA GENERALE
   ========================================= */
.app-container { 
    display: flex; 
    min-height: 100vh; 
    width: 100%; 
}

.main-content {
    flex-grow: 1;
    width: 100%;
    padding: 40px; /* Padding standard per Admin */
    box-sizing: border-box;
    transition: margin-left 0.3s ease;
}

/* Sidebar Attiva (Solo Desktop Admin) */
body.has-sidebar .main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-mini-width) !important;
    width: calc(100% - var(--sidebar-mini-width)) !important;
}

/* --- PAGINE FULL WIDTH (Home, Chat, Login) --- */
/* Questa classe viene aggiunta dinamicamente da Twig */
body.layout-full .main-content,
body.layout-full.has-sidebar .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 0 !important;
}

/* =========================================
   2. MODALE DI CONFERMA SISTEMA
   ========================================= */
.system-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center; justify-content: center;
    z-index: 20000;
    opacity: 0; transition: opacity 0.2s ease;
}

.system-modal-overlay.open { display: flex; opacity: 1; }

.system-modal-card {
    background: white; padding: 32px; border-radius: 20px;
    max-width: 400px; width: 90%; text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95); transition: transform 0.2s ease;
}
.system-modal-overlay.open .system-modal-card { transform: scale(1); }

.modal-icon {
    width: 60px; height: 60px;
    background: #fef3f2; color: var(--danger-red);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin: 0 auto 20px;
}

.modal-btns { display: flex; gap: 12px; margin-top: 24px; }

.btn-base {
    flex: 1; padding: 12px; border-radius: 10px;
    font-weight: 600; cursor: pointer; border: none; transition: 0.2s;
    text-decoration: none; display: flex; align-items: center; justify-content: center;
}
.btn-confirm { background: var(--danger-red); color: white; }
.btn-confirm:hover { background: #dc2626; }
.btn-cancel { background: #f1f5f9; color: #475569; }
.btn-cancel:hover { background: #e2e8f0; }

/* =========================================
   3. COOKIE BANNER (GDPR)
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #ffffff;
    /* Bordo laterale color oro Phase per eleganza */
    border-left: 4px solid var(--phase-gold); 
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 15px 20px;
    /* Parte nascosto verso il basso */
    transform: translateY(150%);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    max-width: 600px;
    margin: 0 auto; /* Centrato */
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cookie-icon {
    font-size: 1.5rem;
    color: var(--phase-gold);
}

.cookie-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.4;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.cookie-link {
    font-size: 0.8rem;
    color: #64748b;
    text-decoration: underline;
}

.btn-cookie {
    background: var(--phase-dark);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-cookie:hover {
    background: #1e293b;
}

/* Mobile Fix per Banner Cookie */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .cookie-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 10px;
    }
}