/* ====================================================================
   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;
}
