/* --- LAYOUT GENERALE --- */
.sacconi-sync-wrapper { position: relative !important; z-index: 1 !important; }
.s-custom-cal { width: 100% !important; max-width: 100% !important; overflow: visible !important; transition: opacity 0.3s; }

/* Nome del Mese */
.s-m-name { 
    position: relative !important; text-align: center !important; 
    margin-bottom: 10px !important; color: #333 !important; 
    font-size: 16px !important; line-height: 1.5 !important; padding: 0 40px !important; 
}

/* Frecce di navigazione */
.s-nav-arrow { 
    position: absolute !important; top: 50% !important; transform: translateY(-50%) !important; 
    font-size: 32px !important; text-decoration: none !important; color: #bbb !important; 
    cursor: pointer !important; z-index: 2 !important; line-height: 1 !important; 
    display: block !important; padding: 0 10px !important;
}
.s-nav-arrow:hover { color: #006288 !important; }
.s-nav-arrow.prev { left: 5px !important; right: auto !important; }
.s-nav-arrow.next { right: 5px !important; left: auto !important; }
.s-mobile-only { display: none !important; }

/* Griglia e Giorni */
.s-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important; gap: 20px !important; }
.s-month { background: #fff !important; border: 1px solid #eee !important; padding: 10px !important; border-radius: 8px !important; }
.s-d-grid { display: grid !important; grid-template-columns: repeat(7, 1fr) !important; gap: 4px !important; }

.s-h { 
    font-size: 10px !important; color: #999 !important; font-weight: bold !important; padding-bottom: 5px !important;
    display: flex !important; align-items: center !important; justify-content: center !important; text-align: center !important;
}

.s-day { 
    aspect-ratio: 1 !important; display: flex !important; align-items: center !important; justify-content: center !important; 
    font-size: 13px !important; position: relative !important; overflow: hidden !important; 
    border-radius: var(--s-radius) !important;
}

.s-day span { z-index: 1 !important; color: #333 !important; }

/* Colori e Stati (Dinamici tramite variabili) */
.s-free { background-color: var(--s-free) !important; }
.s-full { background-color: var(--s-occ) !important; color: #fff !important; }
.s-full span { color: #fff !important; }

.s-start { background: linear-gradient(135deg, var(--s-free) 49.9%, var(--s-occ) 50.1%) !important; }
.s-end { background: linear-gradient(135deg, var(--s-occ) 49.9%, var(--s-free) 50.1%) !important; }
.s-start span, .s-end span { color: #333 !important; }

/* --- 📱 OTTIMIZZAZIONE MOBILE --- */
@media (max-width: 600px) { 
    .s-month { touch-action: none !important; } /* Blocca lo scroll verticale */
    .s-grid { grid-template-columns: 1fr !important; }
    .s-month:not(:first-child) { display: none !important; }
    .s-m-name { margin-bottom: 25px !important; font-size: 18px !important; }
    .s-mobile-only { display: block !important; }
    .s-desktop-only { display: none !important; }
    .s-nav-arrow { 
        font-size: 40px !important; padding: 0 15px !important; 
        -webkit-tap-highlight-color: transparent !important; 
        outline: none !important;
        user-select: none !important;
    }
}