/**
 * Styles pour les modales partagées d'absence (ajout et conflits).
 * Utilisé par planning-general, driver-calendar, month, etc.
 * Aligné sur le style de planning-general.css.
 */

/* Modal d'ajout d'absence */
#addAbsenceModal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    overflow-y: hidden !important;
}

#addAbsenceModal .modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#addAbsenceModal .modal-body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

#addAbsenceModal .modal-footer {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-top: 2px solid #e1e8ed;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

#addAbsenceModal .form-group {
    margin-bottom: 20px;
}

#addAbsenceModal .form-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

#addAbsenceModal .form-control {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
    color: #2c3e50;
    box-sizing: border-box;
}

#addAbsenceModal .form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#addAbsenceModal .form-control[type="date"],
#addAbsenceModal .form-control[type="time"] {
    padding: 10px 15px;
}

#addAbsenceModal .form-control[type="date"]::-webkit-calendar-picker-indicator,
#addAbsenceModal .form-control[type="time"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
}

#addAbsenceModal .form-control[type="date"]::-webkit-calendar-picker-indicator:hover,
#addAbsenceModal .form-control[type="time"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

#addAbsenceModal select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232c3e50' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

#addAbsenceModal textarea.form-control {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

#addAbsenceModal .form-control:invalid {
    border-color: #e74c3c;
}

#addAbsenceModal .form-control:valid:not(:placeholder-shown) {
    border-color: #27ae60;
}

#addAbsenceModal .form-control:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

#addAbsenceModal select.form-control:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Modal de conflits (partagée) */
#sharedConflictModal {
    z-index: 2000 !important;
}

#sharedConflictModal .modal-content {
    max-width: 700px;
}

#sharedConflictList {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
}

#sharedConflictList > div {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

#sharedConflictList > div:last-child {
    border-bottom: none;
}

#sharedConflictList .mission-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}
