/* Улучшения для стандартных полей даты */

/* Стилизация полей типа date */
input[type="date"] {
    position: relative;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
}

/* Темная тема для полей даты */
.bg-dark input[type="date"],
input[type="date"].form-control {
    background-color: #2d2d2d;
    border: 1px solid #444;
    color: white;
}

.bg-dark input[type="date"]:focus,
input[type="date"].form-control:focus {
    background-color: #2d2d2d;
    border-color: var(--gold-color, #DAA520);
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(218, 165, 32, 0.25);
}

/* Календарная иконка для браузеров, которые её не показывают */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(1);
    opacity: 0.8;
}

/* Для темной темы */
.bg-dark input[type="date"]::-webkit-calendar-picker-indicator,
input[type="date"].form-control::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.8;
}

/* Убираем стандартную иконку в Firefox */
input[type="date"]::-moz-calendar-picker-indicator {
    opacity: 0.8;
}

/* Стили для поля даты в состоянии ошибки */
input[type="date"].is-invalid {
    border-color: #dc3545;
}

input[type="date"].is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    input[type="date"] {
        font-size: 16px; /* Предотвращает зум на iOS */
    }
}

/* Анимация для фокуса */
input[type="date"]:focus {
    outline: 0;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Стили для групп полей дат */
.date-range-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.date-range-group input[type="date"] {
    flex: 1;
}

.date-range-separator {
    padding: 0 0.5rem;
    color: #6c757d;
    font-weight: 500;
}

/* Подсказки для полей даты */
input[type="date"]::placeholder {
    color: #6c757d;
    opacity: 1;
}

/* Поддержка RTL для арабского языка (если потребуется) */
[dir="rtl"] input[type="date"] {
    text-align: right;
}


