/* ── Consultation modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.2s ease-out;
}

.modal-overlay.is-open {
    display: flex;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-box {
    background: #fff;
    border-radius: 16px;
    max-width: 440px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.25s ease-out;
}

@keyframes modalSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid oklch(90% 0.01 70);
    position: relative;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text, #1a1a1a);
    margin: 0 32px 0 0;
}

.modal-subtitle {
    font-size: 14px;
    color: oklch(45% 0.01 60);
    margin-top: 6px;
    line-height: 1.5;
}

.modal-close {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 32px;
    height: 32px;
    background: oklch(95% 0.008 70);
    border: 1px solid oklch(88% 0.01 70);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    color: oklch(50% 0.01 60);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
    background: oklch(92% 0.01 70);
    color: var(--color-text, #1a1a1a);
}

.modal-body {
    padding: 24px;
}

.form-field {
    margin-bottom: 16px;
}

.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: oklch(40% 0.01 60);
    margin-bottom: 7px;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid oklch(86% 0.01 70);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: var(--color-text, #1a1a1a);
    background: oklch(98.5% 0.005 70);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: var(--color-accent, #8B6F4E);
    box-shadow: 0 0 0 3px oklch(52% 0.12 55 / 0.14);
}

.form-field textarea {
    min-height: 80px;
    resize: vertical;
}

.form-field--hidden {
    display: none !important;
}

.form-submit {
    width: 100%;
    padding: 12px;
    background: var(--color-accent, #8B6F4E);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.form-submit:hover {
    background: oklch(44% 0.1 55);
}

.form-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-note {
    font-size: 11.5px;
    color: oklch(52% 0.01 60);
    text-align: center;
    margin-top: 12px;
    line-height: 1.5;
}

.form-note a {
    color: var(--color-accent, #8B6F4E);
    text-decoration: underline;
}

.alert-box {
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.alert-success {
    background: oklch(55% 0.14 145 / 0.1);
    border: 1px solid oklch(55% 0.14 145 / 0.3);
    color: oklch(33% 0.12 145);
}

.alert-error {
    background: oklch(55% 0.18 25 / 0.08);
    border: 1px solid oklch(55% 0.18 25 / 0.3);
    color: oklch(40% 0.18 25);
}

/* Кнопка в шапке */
.btn-consultation {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--color-accent, #8B6F4E);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}

.btn-consultation:hover {
    background: oklch(44% 0.1 55);
}

@media (max-width: 768px) {
    .modal-box {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        align-self: flex-end;
    }
    
    .btn-consultation span {
        display: none;
    }
}
