/* Стили для модального окна с формой */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(25, 36, 49, 0.9);
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fdf7f5;
    border-radius: 12px;
    padding: 40px 45px;
    width: 100%;
    max-width: 660px;
    margin: 40px auto;
    position: relative;
    animation: slideIn 0.4s ease;
}

.modal .close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    color: #f07048;
    transition: transform 0.3s ease;
    z-index: 10;
    background: none;
    border: none;
    line-height: 1;
}

.modal .close:hover {
    transform: rotate(90deg);
}

/* Стили формы (ваши оригинальные стили) */
.booking-widget-container {
    font-family: 'Nunito', sans-serif;
}

.booking-title {
    color: #192431;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 25px;
}

.booking-form-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-bottom: 1px solid #FAECE5;
    padding-bottom: 25px;
    margin-top: 45px;
}

.booking-form-row:first-child {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.booking-form-col {
    flex: 0 0 48%;
    max-width: 48%;
    margin-bottom: 20px;
}

.booking-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #4A4A4A;
    margin-bottom: 10px;
    text-align: left;
}

.booking-label.required::after {
    content: "*";
    color: #f07048;
    font-size: 18px;
    margin-left: 4px;
}

.booking-input {
    width: 100%;
    background-color: transparent;
    color: #192431;
    border: 3px solid #faece5;
    border-radius: 30px;
    height: 50px;
    font-size: 18px;
    font-weight: 500;
    padding: 0 22px;
    transition: all 0.3s ease;
    outline: none;
    font-family: 'Nunito', sans-serif;
    box-sizing: border-box;
}

.booking-input:focus {
    border-color: #f07048;
}

.booking-input.error {
    border-color: #f07048;
}

.booking-input::placeholder {
    color: #b0a8a3;
}

/* Количество гостей */
.booking-qty-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.booking-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #f07048;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Nunito', sans-serif;
}

.booking-qty-btn:hover {
    background-color: #FAECE5;
}

.booking-qty-input {
    width: 60px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: none;
    background: transparent;
    outline: none;
    font-family: 'Nunito', sans-serif;
}

/* Дата */
.booking-date-input {
    cursor: pointer;
}

/* Временные слоты */
.booking-times {
    margin-top: 30px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.booking-times.active {
    max-height: 500px;
}

.booking-times-wrap {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -5px;
    margin-top: 15px;
}

.booking-time-item {
    flex: 0 0 calc(25% - 10px);
    max-width: calc(25% - 10px);
    margin: 5px;
    padding: 10px 5px;
    text-align: center;
    border: 3px solid #faece5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    font-family: 'Nunito', sans-serif;
}

.booking-time-item:hover {
    background-color: #faece5;
}

.booking-time-item.active {
    background-color: #f07048;
    border-color: #f07048;
    color: #fff;
}

.booking-time-item.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Комментарий */
.booking-comment {
    margin-top: 30px;
}

.booking-textarea {
    width: 100%;
    height: 102px;
    background-color: transparent;
    color: #192431;
    border: 3px solid #faece5;
    border-radius: 30px;
    padding: 17px 22px;
    font-size: 18px;
    font-weight: 500;
    font-family: 'Nunito', sans-serif;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.booking-textarea:focus {
    border-color: #f07048;
}

/* Чекбокс согласия */
.booking-policy {
    display: flex;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}

.booking-policy-checkbox {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border: 3px solid #f07048;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.booking-policy-checkbox.active::after {
    content: "";
    width: 6px;
    height: 10px;
    border: solid #f07048;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-2px, -2px);
}

.booking-policy-checkbox input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.booking-policy-text {
    font-size: 13px;
    line-height: 18px;
    font-weight: 500;
    color: #4A4A4A;
}

.booking-policy-text a {
    color: #f07048;
    text-decoration: none;
}

/* Кнопка отправки */
.booking-submit {
    cursor: pointer;
    color: #ffffff;
    background-color: #f07048;
    padding: 0;
    height: 46px;
    font-size: 18px;
    border-radius: 40px;
    width: 100%;
    max-width: 220px;
    text-align: center;
    line-height: 46px;
    font-weight: 700;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 12px 20px rgba(240, 112, 72, 0.5);
    font-family: 'Nunito', sans-serif;
    margin-top: 20px;
}

.booking-submit:hover:not(:disabled) {
    background-color: #e8653a;
    box-shadow: 0 16px 32px rgba(240, 112, 72, 0.8);
    transform: translateY(-2px);
}

.booking-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Сообщение об успехе */
.booking-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.booking-success.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.booking-success-title {
    font-size: 36px;
    font-weight: 700;
    color: #192431;
    margin-bottom: 20px;
}

.booking-success-text {
    font-size: 18px;
    color: #4A4A4A;
    line-height: 1.6;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: scale(0.9) translateY(30px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Спиннер загрузки */
.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Адаптив */
@media (max-width: 720px) {
    .modal-content {
        padding: 30px 20px;
        margin: 10px;
    }

    .booking-title {
        font-size: 24px;
    }

    .booking-form-col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .booking-time-item {
        flex: 0 0 calc(33.33% - 10px);
        max-width: calc(33.33% - 10px);
    }

    .booking-submit {
        max-width: 100%;
    }
}

@media (max-width: 400px) {
    .booking-time-item {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
        font-size: 12px;
    }
}