/* Форма заявки: стили ограничены её всплывающим окном. */
#contacts-popup {
    --quote-red: #a90000;
    --quote-ink: #252525;
    --quote-muted: #6b6865;
    --quote-line: #d6d2ce;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: calc(100% - 32px);
    max-width: 720px;
    margin: 32px auto;
    padding: 0;
    background: #fff;
    color: var(--quote-ink);
    text-align: left;
    font-family: Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    box-shadow: 0 16px 64px rgb(35 25 20 / 16%);
}
#contacts-popup *, #contacts-popup *::before, #contacts-popup *::after { box-sizing: border-box; }
#contacts-popup div.wpcf7 { padding: 32px; background: transparent; }
#contacts-popup :where(.quote-form p) { margin: 0; }
#contacts-popup .quote-form br { display: none; }
#contacts-popup .quote-form__title {
    margin: 0;
    height: auto;
    min-height: 0;
    max-height: none;
    padding-right: 32px;
    font-size: 28px;
    line-height: 1.18;
    font-weight: 400;
    letter-spacing: -.5px;
    color: var(--quote-ink);
    text-wrap: balance;
}
#contacts-popup .quote-form__description { margin-top: 12px; font-size: 14px; color: var(--quote-muted); }
#contacts-popup .quote-form__metadata { display: none; }
#contacts-popup .quote-form__context {
    margin-top: 24px;
    padding: 14px 18px;
    border-left: 3px solid #ba9c82;
    background: #f5f3f0;
    color: #55483e;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
#contacts-popup .quote-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin-top: 24px; }
#contacts-popup .quote-form__field { display: block; min-width: 0; margin: 0; font-size: 14px; }
#contacts-popup .quote-form__label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 400; }
#contacts-popup .quote-form__required { color: var(--quote-red); }
#contacts-popup .quote-form__optional { color: var(--quote-muted); font-size: 12px; font-weight: 300; }
#contacts-popup .quote-form__wide { grid-column: 1 / -1; }
#contacts-popup .quote-form__field .wpcf7-form-control-wrap { display: block; }
#contacts-popup .quote-form__field input,
#contacts-popup .quote-form__field textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 11px 13px;
    border: 1px solid var(--quote-line);
    border-radius: 3px;
    background: #fff;
    color: var(--quote-ink);
    font: 400 16px/1.4 Roboto, Arial, sans-serif;
    box-shadow: none;
    transition: border-color .16s, box-shadow .16s;
}
#contacts-popup .quote-form__field textarea { height: 94px; min-height: 94px; resize: vertical; }
#contacts-popup .quote-form__field textarea::placeholder { color: #77736f; font-size: 14px; font-weight: 300; }
#contacts-popup .quote-form__field input:hover,
#contacts-popup .quote-form__field textarea:hover { border-color: #aaa29b; }
#contacts-popup .quote-form__field input:focus,
#contacts-popup .quote-form__field textarea:focus { border-color: var(--quote-red); outline: 0; box-shadow: 0 0 0 3px rgb(169 0 0 / 9%); }
#contacts-popup .quote-form__field .wpcf7-not-valid { border-color: var(--quote-red); }
#contacts-popup .quote-form__attachment { margin-top: 20px; }
#contacts-popup .quote-form__file {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 62px;
    padding: 12px 16px;
    border: 1px dashed #c8b9ac;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color .16s, border-color .16s;
}
#contacts-popup .quote-form__file:hover { background: #faf8f5; border-color: #a38c78; }
#contacts-popup .quote-form__file:focus-within { outline: 2px solid var(--quote-red); outline-offset: 3px; }
#contacts-popup .quote-form__file > svg { flex: 0 0 24px; width: 24px; height: 24px; color: var(--quote-red); }
#contacts-popup .quote-form__file-copy { display: block; min-width: 0; }
#contacts-popup .quote-form__file-title { display: block; font-size: 14px; font-weight: 400; color: var(--quote-ink); }
#contacts-popup .quote-form__filename { display: block; margin-top: 2px; font-size: 12px; color: var(--quote-muted); overflow-wrap: anywhere; }
#contacts-popup .quote-form__file .wpcf7-form-control-wrap { position: static; }
#contacts-popup .quote-form__file input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
#contacts-popup .quote-form__file-hint { margin-top: 7px; font-size: 12px; color: var(--quote-muted); }
#contacts-popup .quote-form__footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #e9e5e1; }
#contacts-popup .quote-form__consent .wpcf7-list-item { margin: 0; }
#contacts-popup .quote-form__consent label { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 12px; line-height: 1.5; cursor: pointer; }
#contacts-popup .quote-form__consent input[type="checkbox"] { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; accent-color: var(--quote-red); cursor: pointer; }
#contacts-popup .quote-form__consent input:focus-visible { outline: 2px solid var(--quote-red); outline-offset: 3px; }
#contacts-popup .quote-form__consent a { color: #625143; text-decoration: underline; text-underline-offset: 3px; }
#contacts-popup .quote-form__consent a:hover { color: var(--quote-red); }
#contacts-popup .quote-form__actions { position: relative; }
#contacts-popup .quote-form__submit {
    display: block;
    min-height: 48px;
    width: 100%;
    margin: 0;
    padding: 13px 24px;
    border: 1px solid var(--quote-red);
    border-radius: 3px;
    background: var(--quote-red);
    color: #fff;
    font: 400 15px/1.4 Roboto, Arial, sans-serif;
    cursor: pointer;
    transition: background-color .16s, transform .16s;
}
#contacts-popup .quote-form__submit:hover:not(:disabled) { background: #870000; }
#contacts-popup .quote-form__submit:active:not(:disabled) { transform: translateY(1px); }
#contacts-popup .quote-form__submit:disabled { background: #e9e5e1; border-color: #e9e5e1; color: #77716b; cursor: not-allowed; }
#contacts-popup .quote-form__submit:focus-visible,
#contacts-popup .mfp-close:focus-visible,
#contacts-popup a:focus-visible { outline: 2px solid var(--quote-red); outline-offset: 4px; }
#contacts-popup .quote-form__actions .wpcf7-spinner { position: absolute; top: 12px; right: -28px; margin: 0; }
#contacts-popup .wpcf7-not-valid-tip { margin-top: 6px; font-size: 12px; line-height: 1.4; color: var(--quote-red); }
#contacts-popup .wpcf7-response-output { margin: 20px 0 0; padding: 12px 14px; font-size: 14px; line-height: 1.5; }
#contacts-popup button.mfp-close { top: 12px; right: 12px; width: 40px; height: 40px; padding: 0; color: #77716b; font: 300 30px/40px Arial, sans-serif; opacity: 1; }
#contacts-popup button.mfp-close:hover { color: var(--quote-red); background: #f5f3f0; }
@media (max-width: 600px) {
    #contacts-popup { width: calc(100% - 16px); margin: 16px auto; }
    #contacts-popup div.wpcf7 { padding: 24px 20px; }
    #contacts-popup .quote-form__title { font-size: 25px; padding-right: 26px; }
    #contacts-popup .quote-form__description { max-width: 28ch; }
    #contacts-popup .quote-form__context { margin-top: 20px; font-size: 16px; padding: 12px 14px; }
    #contacts-popup .quote-form__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 20px; }
    #contacts-popup .quote-form__footer { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 20px; }
    #contacts-popup .quote-form__consent label { min-height: 40px; align-items: flex-start; }
    #contacts-popup .quote-form__submit { min-height: 50px; }
    #contacts-popup .quote-form__actions .wpcf7-spinner { right: 12px; }
    #contacts-popup button.mfp-close { top: 10px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    #contacts-popup input, #contacts-popup textarea, #contacts-popup label { transition: none; }
}
/* Contact Form 7 оборачивает соседние label в общий абзац. */
#contacts-popup .quote-form__grid > p { display: contents; }
/* Фиксированная мобильная панель темы имеет тот же предельный z-index, что и окно. */
body:has(.mfp-wrap #contacts-popup) .mobile_top { visibility: hidden; }
