/* ========================= */
/* 🔹 ОБНОВЛЕННЫЙ СТИЛЬ МОДАЛЬНОГО ОКНА */
/* ========================= */

/* Фон и диалог */
.modal {
    backdrop-filter: blur(10px);
    padding: 20px;
}

.modal-dialog {
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8),
                0 0 0 1px rgba(255, 255, 255, 0.05),
                0 0 30px rgba(255, 215, 0, 0.1);
    border-radius: 16px;
    background-color: #111;
    padding: 25px;
    max-width: 500px;
    margin: 0 auto;
}



#modalCarTitle {
    padding-top: 15px; /* добавляем отступ сверху, чтобы не налезала кнопка */
    padding-bottom: 15px;
    font-size: 24px;
    text-align: left;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    margin-bottom: 25px;
    color: #fff;
}

/* Медиа-запрос для маленьких экранов */
@media (max-width: 400px) {
    #modalCarTitle {
        padding-top: 60px; /* увеличиваем отступ сверху для маленьких экранов */
        font-size: 20px;
    }
}
/* Кнопка закрытия */
.close-button {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

/* ========================= */
/* 🔹 ФОРМА */
/* ========================= */

#reservationForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    font-family: 'Inter', 'Segoe UI', sans-serif;
}
/* ========================= */
/* 🔹 ПОЛЯ ФАКТУРЫ */
/* ========================= */

.invoice-fields {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.05), rgba(255, 215, 0, 0.02));
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    animation: slideDown 0.3s ease-out;
}

.invoice-fields-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.invoice-fields .form-group {
    margin-bottom: 15px;
}

.invoice-fields .form-group:last-child {
    margin-bottom: 0;
}

/* Анимация появления */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

/* Адаптивность для фактуры */
@media (max-width: 768px) {
    .invoice-fields {
        padding: 15px;
    }
    
    .invoice-fields-header {
        font-size: 15px;
    }
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 🎯 Исправление именно блока даты и времени */
.form-group.date-time {
    display: flex;
    gap: 5px;
    align-items: center;
}

.form-group.date-time input[type="date"],
.form-group.date-time select {
    height: 46px;
    line-height: 46px;
    padding: 0 14px;
    border-radius: 8px;
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 215, 0, 0.25) !important;
    font-weight: 500;
    font-size: 15px;
    box-sizing: border-box;
    width: 100%;
}


/* На мобильных */
@media (max-width: 600px) {
    .form-group.date-time {
        flex-direction: column;
        align-items: stretch;
    }

    .form-group.date-time input[type="date"],
    .form-group.date-time select {
        width: 100%;
    }
}


/* Поля ввода */
.modal form input[type="text"],
.modal form input[type="tel"],
.modal form input[type="email"],
.modal form input[type="date"],
.modal form input[type="number"],
.modal form select,
.modal form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 215, 0, 0.25) !important;
    font-weight: 500;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.modal form input:hover,
.modal form textarea:hover,
.modal form select:hover {
    background-color: #252525 !important;
    border-color: rgba(255, 215, 0, 0.4) !important;
}

.modal form input:focus,
.modal form select:focus,
.modal form textarea:focus {
    background-color: #252525 !important;
    border-color: rgba(255, 215, 0, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15) !important;
}

.modal form input::placeholder,
.modal form textarea::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Специальные поля */
#kilometers {
    font-weight: 600;
    font-size: 16px;
}

/* Select */
.modal form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23ffd700' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    cursor: pointer;
}

.modal form select option {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

.modal form select option:checked {
    background-color: rgba(255, 215, 0, 0.2) !important;
    color: #ffd700 !important;
}

/* ========================= */
/* 🔹 ЦЕНА */
/* ========================= */

.price-breakdown {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.03));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.1);
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    font-size: 15px;
    color: #e0e0e0;
}

.price-item:last-child {
    border-bottom: none;
}

.price-item.total {
    border-top: 2px solid rgba(255, 215, 0, 0.5);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    padding-top: 15px;
}

.price-item.total span:last-child {
    color: #ffd700;
    font-size: 22px;
}

/* ========================= */
/* 🔹 ЧЕКБОКС */
/* ========================= */

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: rgba(255, 215, 0, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 12px 15px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #ffd700;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 14px;
    color: #fff;
}

.checkbox-group a {
    color: #ffd700;
    font-weight: 600;
}

/* ========================= */
/* 🔹 КНОПКА */
/* ========================= */

#reservationForm button {
    width: 100%;
    padding: 14px 0;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #ffd700, #ffed4e, #d4af37);
    color: #000;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 15px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

#reservationForm button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

#reservationForm button:disabled {
    background: linear-gradient(135deg, #4a4a4a, #3a3a3a);
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

/* ========================= */
/* 🔹 ПОДСКАЗКИ И ЛЕЙБЛЫ */
/* ========================= */

.form-group small {
    display: block;
    margin-top: 6px;
    color: rgba(255, 215, 0, 0.8);
    font-size: 13px;
    font-style: italic;
}

#kilometers + small {
    text-align: center;
    color: rgba(255, 215, 0, 0.9);
    font-weight: 600;
}

.modal form label {
    color: #ffffff;
    font-weight: 500;
    font-size: 14px;
}

/* ========================= */
/* 🔹 АНИМАЦИЯ ОШИБОК */
/* ========================= */

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #ff5252;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ========================= */
/* 🔹 СКРОЛЛБАР */
/* ========================= */

.modal-dialog::-webkit-scrollbar {
    width: 8px;
}

.modal-dialog::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.modal-dialog::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 4px;
}

.modal-dialog::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

/* ========================= */
/* 🔹 АДАПТИВНОСТЬ */
/* ========================= */

@media (max-width: 768px) {
    .modal-dialog {
        padding: 20px 15px;
    }

    .modal h3, #modalCarTitle {
        font-size: 20px;
    }

    #reservationForm button {
        font-size: 14px;
        padding: 12px 0;
    }

    .price-item.total span:last-child {
        font-size: 20px;
    }
}
