/* ===== Оверлей модального окна ===== */
.modal-order-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-order-overlay.is-open {
    display: flex;
}

/* ===== Контейнер модального окна ===== */
.modal-order-window {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 40px 32px 32px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    margin: auto;
    box-sizing: border-box;
}

/* ===== Кнопка закрытия ===== */
.modal-order-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    border-radius: 50%;
    padding: 0;
    transition: background .15s, color .15s;
}
.modal-order-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* ===== Заголовок ===== */
.modal-order-title {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 700;
    color: #111;
    text-align: center;
}

/* ===== Вводный текст ===== */
.modal-order-intro {
    margin: 0 0 20px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    text-align: center;
}

/* ===== Информация об объекте ===== */
.modal-order-place-info {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    border-left: 4px solid #1a7f37;
}

.modal-order-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 6px 0;
    font-size: 14px;
}
.modal-order-info-row:not(:last-child) {
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.modal-order-label {
    font-weight: 600;
    color: #555;
    min-width: 80px;
}

.modal-order-value {
    color: #111;
    text-align: right;
    flex: 1;
    padding-left: 12px;
}

/* ===== Форма ===== */
.modal-order-form {
    margin-bottom: 20px;
}

.modal-order-field {
    margin-bottom: 16px;
}

.modal-order-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.modal-order-field input[type="text"],
.modal-order-field input[type="tel"],
.modal-order-field textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}

.modal-order-field input[type="text"]:focus,
.modal-order-field input[type="tel"]:focus,
.modal-order-field textarea:focus {
    outline: none;
    border-color: #1a7f37;
    box-shadow: 0 0 0 3px rgba(26, 127, 55, 0.1);
}

.modal-order-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===== Блок согласия ===== */
.modal-order-agreement {
    margin-bottom: 20px;
    padding: 12px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    transition: border-color .15s, background .15s;
}

.modal-order-agreement.error {
    background: #fff3f3;
    border-color: #ffcccc;
}

.modal-order-agreement-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    margin: 0;
    padding: 0;
}

.modal-order-agreement-label input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
    accent-color: #1a7f37;
    width: 18px;
    height: 18px;
    min-width: 18px;
    flex-shrink: 0;
}

.modal-order-agreement-label a {
    color: #1a7f37;
    text-decoration: none;
}
.modal-order-agreement-label a:hover {
    text-decoration: underline;
}

/* ===== Сообщение об ошибке согласия ===== */
.modal-order-agreement-error {
    margin-top: 8px;
    font-size: 12px;
    color: #c00;
    display: none;
    animation: slideDown .2s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Кнопка отправки ===== */
.modal-order-submit {
    width: 100%;
    padding: 13px;
    background: #1a7f37;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    margin-bottom: 12px;
}
.modal-order-submit:hover:not(:disabled) {
    background: #146c2e;
}
.modal-order-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ===== Информационный текст ===== */
.modal-order-info-text {
    margin: 0;
    font-size: 12px;
    color: #999;
    text-align: center;
    line-height: 1.4;
}

/* ===== Результат (успех) ===== */
.modal-order-result {
    text-align: center;
    padding: 20px 0;
}

.modal-order-success {
    margin: 0;
    font-size: 16px;
    color: #1a7f37;
    line-height: 1.5;
    font-weight: 500;
}

/* ===== Адаптивность ===== */
@media (max-width: 600px) {
    .modal-order-window {
        padding: 32px 20px 20px;
        max-width: 90vw;
    }
    .modal-order-title {
        font-size: 20px;
    }
    .modal-order-intro {
        font-size: 13px;
    }
}
