﻿/* ====================================================================
   SCHEDULER COMMON STYLES - VERSIONE PULITA
   Lascia che Syncfusion gestisca il layout nativo dello scheduler
   ==================================================================== */

/* --- CONTENITORI COMUNI --- */

/* Control section - base per tutti i display */
.control-section {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Content wrapper - base flex */
.content-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
}

/* --- DESKTOP (?768px) --- */
@media (min-width: 768px) {
    .control-section {
        height: calc(100vh - 120px) !important;
    }

    .content-wrapper {
        overflow: hidden;
    }

    /* Grid-to-schedule: layout orizzontale per scheduler + grid */
    .grid-to-schedule {
        flex-direction: row !important;
    }

    /* Schedule container */
    .schedule-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-width: 0; /* Previene overflow in flexbox */
    }

    /* Schedule content */
    .schedule-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-width: 0; /* Previene overflow in flexbox */
    }

    /* Grid laterale (solo Scheduler.razor) */
    .grid-content {
        width: 280px;
        flex-shrink: 0;
        overflow-y: auto;
        border-left: 1px solid #dee2e6;
        margin-left: 10px;
    }
}

/* --- MOBILE (<768px) --- */
@media (max-width: 767px) {
    .control-section {
        min-height: 100vh;
    }

    .content-wrapper {
        min-height: calc(100vh - 80px);
    }

    /* Grid nascosta in mobile */
    .grid-content {
        display: none !important;
    }

    .content-wrapper.grid-to-schedule .schedule-container .grid-content {
        margin-top: 10px;
        margin-left: 0;
        padding-top: 20px;
    }
}

/* --- FIX SYNCFUSION MOBILE --- */
@media (max-width: 767px) {
    .e-toolbar .e-toolbar-items {
        flex-wrap: wrap;
    }

    .e-content-wrap {
        -webkit-overflow-scrolling: touch;
    }
}

/* --- RIPOSIZIONAMENTO PRENOTAZIONI --- */

.prenotazione.in-reposition {
    border: 3px dashed #ff9800 !important;
    opacity: 0.7;
    animation: pulse-reposition 2s infinite;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
}

@keyframes pulse-reposition {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 152, 0, 0.5);
        opacity: 0.7;
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 152, 0, 0.8);
        opacity: 0.9;
    }
}

.e-schedule-table.e-content-table {
    cursor: inherit;
}

.schedule-content.reposition-mode .e-work-cells {
    cursor: pointer !important;
}

.schedule-content.reposition-mode .e-work-cells:hover {
    background-color: rgba(255, 152, 0, 0.1) !important;
}


/* ====================================================================
   DIFFERENZIAZIONE CORSI PER ETÀ
   Gradazione progressiva: Arancione (≤5-9) → Marrone (10-13) → Blu (14-17) → Nero (>17)
   ==================================================================== */

/* === ARANCIONE: ≤5, 6, 7, 8, 9 anni (gradazione chiaro → scuro) === */

/* ≤5 anni - Arancione molto chiaro */
.e-schedule .e-appointment.corso.eta-0-5 {
    border-left: 5px solid #FFE0B2 !important;
}

/* 6 anni - Arancione chiaro */
.e-schedule .e-appointment.corso.eta-6 {
    border-left: 5px solid #FFCC80 !important;
}

/* 7 anni - Arancione medio-chiaro */
.e-schedule .e-appointment.corso.eta-7 {
    border-left: 5px solid #FFB74D !important;
}

/* 8 anni - Arancione medio */
.e-schedule .e-appointment.corso.eta-8 {
    border-left: 5px solid #FFA726 !important;
}

/* 9 anni - Arancione scuro */
.e-schedule .e-appointment.corso.eta-9 {
    border-left: 5px solid #FF9800 !important;
}

/* === MARRONE: 10, 11, 12, 13 anni (gradazione chiaro → scuro) === */

/* 10 anni - Marrone chiaro */
.e-schedule .e-appointment.corso.eta-10 {
    border-left: 5px solid #D7CCC8 !important;
}

/* 11 anni - Marrone medio-chiaro */
.e-schedule .e-appointment.corso.eta-11 {
    border-left: 5px solid #BCAAA4 !important;
}

/* 12 anni - Marrone medio */
.e-schedule .e-appointment.corso.eta-12 {
    border-left: 5px solid #A1887F !important;
}

/* 13 anni - Marrone scuro */
.e-schedule .e-appointment.corso.eta-13 {
    border-left: 5px solid #8D6E63 !important;
}

/* === BLU: 14, 15, 16, 17 anni (gradazione chiaro → scuro) === */

/* 14 anni - Blu chiaro */
.e-schedule .e-appointment.corso.eta-14 {
    border-left: 5px solid #BBDEFB !important;
}

/* 15 anni - Blu medio-chiaro */
.e-schedule .e-appointment.corso.eta-15 {
    border-left: 5px solid #90CAF9 !important;
}

/* 16 anni - Blu medio */
.e-schedule .e-appointment.corso.eta-16 {
    border-left: 5px solid #64B5F6 !important;
}

/* 17 anni - Blu scuro */
.e-schedule .e-appointment.corso.eta-17 {
    border-left: 5px solid #42A5F5 !important;
}

/* === NERO: >17 anni (Adulti) === */

/* Adulti (>17 anni) - Nero */
.e-schedule .e-appointment.corso.eta-adulto {
    border-left: 5px solid #000000 !important;
}
