/* Styles améliorés pour le sélecteur de dates moderne */

/* Styles de base pour les onglets de date (compatibilité) */
.date-tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.date-tab {
    padding: 10px 15px;
    cursor: pointer;
    margin-right: 5px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    font-weight: normal;
    text-decoration: none;
    color: #333;
}

.date-tab:hover {
    background-color: #f1f1f1;
}

.date-tab.active {
    background-color: #fff;
    border-bottom: 1px solid #fff;
    font-weight: bold;
}

/* Ancien formulaire - maintenu pour compatibilité */
#custom-date-form {
    display: none;
    padding: 15px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-top: none;
    margin-bottom: 20px;
}

#custom-date-form.active {
    display: block;
}

#custom-date-form .date-inputs {
    display: flex;
    align-items: center;
}

#custom-date-form .date-field {
    margin-right: 15px;
}

#custom-date-form label {
    margin-right: 5px;
}

#custom-date-form button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

#custom-date-form button:hover {
    background-color: #005177;
}

/* Styles pour le nouveau sélecteur de date */
.date-filter-container {
    margin-bottom: 30px;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.date-filter-container h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    font-size: 16px;
}

.date-picker-wrapper {
    position: relative;
    max-width: 800px;
}

.date-picker-options {
    display: flex;
    align-items: stretch;
}

.quick-options {
    display: flex;
    flex-direction: column;
    flex: 0 0 200px;
    margin-right: 20px;
    border-right: 1px solid #ddd;
    padding-right: 15px;
}

.quick-options .option {
    padding: 8px 10px;
    margin-bottom: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.quick-options .option:hover {
    background: #f5f5f5;
}

.quick-options .option.active {
    background: #e6f7ff;
    color: #1a73e8;
    font-weight: 500;
}

.date-range-input {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.date-range-input input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>') no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    font-size: 14px;
}

.date-picker-calendar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 5px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    z-index: 1000;
}

.calendar-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.calendar-title {
    font-size: 16px;
    font-weight: 500;
}

.calendar-body {
    padding: 15px;
    min-height: 300px;
}

.calendar-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

#start-calendar, #end-calendar {
    flex: 1;
}

.calendar-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-top: 1px solid #eee;
}

.selected-range {
    font-size: 14px;
    color: #666;
}

.calendar-actions {
    display: flex;
    gap: 10px;
}

.calendar-actions button {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.calendar-actions .button-secondary {
    background: #f5f5f5;
    color: #333;
}

.calendar-actions .button-primary {
    background: #1a73e8;
    color: white;
}

.date-range-info {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

/* Styles pour l'UI du calendrier jQuery */
.ui-datepicker {
    font-size: 14px;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: auto !important;
}

.ui-datepicker .ui-datepicker-header {
    background: #f5f5f5;
    border: none;
    border-radius: 4px 4px 0 0;
    padding: 10px;
}

.ui-datepicker th {
    font-weight: 500;
    color: #666;
}

.ui-datepicker td {
    padding: 0;
}

.ui-datepicker td a {
    text-align: center;
    padding: 8px;
    border: none !important;
    background: none !important;
}

.ui-datepicker td a.ui-state-active {
    background: #e6f7ff !important;
    color: #1a73e8;
    border-radius: 4px;
}

.ui-datepicker td a.ui-state-highlight {
    background: #f5f5f5 !important;
    border-radius: 4px;
}

.ui-datepicker td a:hover {
    background: #f5f5f5 !important;
    border-radius: 4px;
}

/* Style responsive */
@media (max-width: 768px) {
    .date-picker-options {
        flex-direction: column;
    }
    
    .quick-options {
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding-bottom: 15px;
        margin-bottom: 15px;
        width: 100%;
    }
    
    .quick-options .option {
        margin-right: 5px;
    }
    
    .calendar-wrapper {
        flex-direction: column;
    }
}