/* ============================================================================
   TIME GRID PICKER - STYLES POUR LA MODALE
   ============================================================================ */

/* Container de la grille avec scroll */
.time-grid-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 0 5px;
}

/* Grilles d'heures et minutes */
.hours-grid,
.minutes-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 15px;
}

/* Grille des heures - 7 colonnes */
.hours-grid {
    grid-template-columns: repeat(7, 1fr);
}

/* Grille des minutes - 4 colonnes */
.minutes-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* Boutons de temps */
.time-btn {
    min-width: 45px;
    height: 40px;
    padding: 8px 4px;
    font-size: 1.0em;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.time-btn:hover {
    background: #e7f1ff;
    border-color: #0d6efd;
    transform: translateY(-1px);
}

.time-btn.active {
    background: #0d6efd !important;
    color: white !important;
    border-color: #0d6efd !important;
}

/* Affichage de l'heure sélectionnée */
#modal-time-display {
    font-size: 1.2em;
    font-weight: bold;
    color: #0d6efd;
    margin-bottom: 20px;
}

/* Labels des sections */
.modal-body .small.text-muted {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
    margin-bottom: 8px;
}

#startTime-display,
#endTime-display {
    width: 100px !important;
    font-size: 1.0em;
}

/* Responsive pour petits écrans */
@media (max-width: 400px) {
    .hours-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .time-btn {
        min-width: 40px;
        height: 36px;
        font-size: 12px;
    }
}

/* Style amélioré pour le select des heures */
.time-select-styled {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0;
    font-size: 1rem;
    background-color: #fff;
    overflow-y: auto;
    max-height: 320px;
}

.time-select-styled option {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f5;
    font-weight: 500;
    color: #495057;
}

.time-select-styled option:last-child {
    border-bottom: none;
}

.time-select-styled option:hover {
    background: linear-gradient(90deg, #fce7f0 0%, #f8f9fa 100%);
    color: #AA0C4F;
    padding-left: 20px;
}

.time-select-styled option:focus {
    outline: none;
    background: linear-gradient(90deg, #f9d0e0 0%, #fce7f0 100%);
    color: #AA0C4F;
    font-weight: 600;
}

.time-select-styled option:checked {
    background: linear-gradient(135deg, #AA0C4F 0%, #8a0a3f 100%);
    color: white;
    font-weight: 600;
    position: relative;
}

.time-select-styled option:checked::before {
    content: "✓ ";
    margin-right: 8px;
    font-weight: bold;
}

/* Scrollbar personnalisée pour le select */
.time-select-styled::-webkit-scrollbar {
    width: 8px;
}

.time-select-styled::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
}

.time-select-styled::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 4px;
}

.time-select-styled::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}

/* Animation à l'ouverture de la modale */
#time-picker-modal .modal-content {
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Style du header de la modale */
#time-picker-modal .modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

#time-picker-modal .modal-title {
    color: #495057;
}

/* Focus visible pour l'accessibilité */
.time-select-styled:focus {
    border-color: #AA0C4F;
    box-shadow: 0 0 0 0.2rem rgba(170, 12, 79, 0.25);
    outline: none;
}