/* ========================================
   Модальные окна
   ======================================== */

/* Модальное окно записи к врачу (базовое скрытие, остальные стили в booking-modal.css) */
.booking-modal {
    display: none;
}

/* Модальное окно "Заказать звонок" */
.modal-callback {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-callback.active {
    display: flex;
}

/* Модальное окно успеха */
.modal-success {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-success.active {
    display: flex;
}

.modal-success-content {
    position: relative;
    z-index: 2;
    background-color: #00C853;
    border-radius: 10px;
    padding: 50px 95px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-success-text {
    color: white;
    font-size: 28px;
    line-height: 1.4;
    text-align: center;
}

/* Оверлей (затемнение фона) */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

/* Контент модального окна */
.modal-content {
    position: relative;
    z-index: 2;
    background-color: white;
    border-radius: 10px;
    max-width: 660px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding-top: 8px;
    padding-left: 93px;
    padding-right: 93px;
    padding-bottom: 35px;
}

.modal-message .modal-content {
    max-width: 680px;
    padding-top: 45px;
    padding-bottom: 45px;
    padding-left: 100px;
    padding-right: 100px;
}

.modal-review .modal-content {
    max-width: 680px;
    padding-top: 45px;
    padding-bottom: 45px;
    padding-left: 100px;
    padding-right: 100px;
}
.modal-review .modal-title {
    color: #1C1C1C;
    text-align: center;
    leading-trim: both;
    text-edge: cap;
    font-size: 23px;
    font-style: normal;
    font-weight: 400;
    line-height: 120%;
    margin-bottom: 15px;
}

/* Кнопка закрытия */
.modal-close {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #383E4B;
    transition: all 0.3s ease;
    z-index: 3;
}

.modal-close:hover {
    background-color: #E01F26;
    color: white;
    transform: rotate(90deg);
}

/* Изображение в модальном окне */
.modal-image {
    margin-bottom: 25px;
    text-align: center;
}

.modal-review .modal-form {
    gap: 15px;
}

.modal-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Заголовок модального окна */
.modal-title {
    color: #383E4B;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    margin: 0 0 25px;
}

/* Рейтинг звезд */
.modal-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.modal-rating input[type="radio"] {
    display: none;
}

.modal-rating .star {
    font-size: 40px;
    color: #E0E0E0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-rating .star:hover,
.modal-rating .star:hover ~ .star,
.modal-rating input[type="radio"]:checked ~ .star {
    color: #FFD700;
}

/* Форма модального окна */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Ряд полей ввода (горизонтальное расположение) */
.modal-inputs-row {
    display: flex;
    gap: 15px;
}

/* Поля ввода */
.modal-input {
    width: 100%;
    padding: 18px 25px;
    border: 1px solid #E0E0E0;
    border-radius: 100px;
    font-size: 16px;
    color: #383E4B;
    outline: none;
    transition: border-color 0.3s ease;
}

.modal-input:focus {
    border-color: #E01F26;
}

.modal-input::placeholder {
    color: #999999;
}

/* Текстовое поле (textarea) */
.modal-textarea {
    width: 100%;
    padding: 18px 25px;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    font-size: 16px;
    color: #383E4B;
    outline: none;
    transition: border-color 0.3s ease;
    resize: vertical;
    min-height: 120px;
}

.modal-textarea:focus {
    border-color: #E01F26;
}

.modal-textarea::placeholder {
    color: #999999;
}

/* Кнопка отправки */
.modal-submit {
    width: 100%;
    padding: 18px 25px;
    background-color: #E01F26;
    border: none;
    border-radius: 100px;
    color: white;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.modal-submit:hover {
    opacity: 0.9;
}

/* Чекбокс согласия */
.modal-checkbox {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
    margin-top: 10px;
}

.modal-checkbox input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #E01F26;
}

.modal-checkbox span {
    color: #898989;
    font-size: 15px;
    line-height: 140%;
    text-edge: cap;
    leading-trim: both;
}

.modal-checkbox a {
    color: #898989;
    text-decoration: underline;
}

.modal-checkbox a:hover {
    text-decoration: none;
}

/* Ошибка валидации */
.modal-input-error {
    border-color: #E01F26 !important;
}

.modal-checkbox.modal-input-error span {
    color: #E01F26;
}

/* Мобильная версия модального окна */
@media (max-width: 1000px) {
    .modal-review .modal-content, .modal-message .modal-content, .modal-callback .modal-content {
        max-width: 90%;
        padding: 30px 20px;
    }
    .modal-message .modal-content {
        padding-top: 50px;
    }
    .modal-form {
        gap: 12px;
    }
    .modal-inputs-row {
        gap: 12px;
    }

    .modal-success-content {
        padding: 25px 30px;
        max-width: 90%;
    }

    .modal-success-text {
        font-size: 18px;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        background-color: rgba(255, 255, 255, 0.95);
    }

    .modal-close svg path {
        stroke: #383E4B;
    }

    .modal-image {
        margin-bottom: 20px;
    }

    .modal-title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .modal-rating {
        gap: 5px;
    }

    .modal-rating .star {
        font-size: 32px;
    }

    .modal-inputs-row {
        flex-direction: column;
    }

    .modal-input,
    .modal-textarea,
    .modal-submit {
        padding: 15px 20px;
        font-size: 15px;
    }

    .modal-textarea {
        min-height: 100px;
    }
}
