/* Коммерческие страницы: штатная CF7-форма в карточке заказа. */

body.st-commercial-v4 .sc4-order-card {
    min-width: 0;
    padding: 32px;
    border: 1px solid #e6e0f5;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 38px #39246e06;
}

body.st-commercial-v4 .sc4-order-card .sc4-eyebrow {
    margin-bottom: 17px;
    color: #806798;
    font-size: 9px;
    letter-spacing: .1em;
}

body.st-commercial-v4 .sc4-order-card h2 {
    margin: 0 0 13px;
    color: #352b49;
    font-size: 28px;
    font-weight: 650;
    line-height: 1.23;
    letter-spacing: -.04em;
    text-wrap: balance;
}

body.st-commercial-v4 .sc4-form-note {
    margin: 0 0 25px;
    color: #796b87;
    font-size: 12px;
    line-height: 1.8;
}

body.st-commercial-v4 .sc4-form-wrapper,
body.st-commercial-v4 .sc4-form-wrapper .wpcf7 {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

body.st-commercial-v4 .sc4-form-wrapper form.wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 13px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6d637a;
    text-align: left;
}

/* В исходном shortcode все поля заключены в один p, отдельные обёртки оставляем. */
body.st-commercial-v4 .sc4-form-wrapper form.wpcf7-form > p {
    display: contents;
    margin: 0;
}

body.st-commercial-v4 .sc4-form-wrapper .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

body.st-commercial-v4 .sc4-form-wrapper :where(label, .sc4-field-label) {
    display: block;
    margin: 0 0 7px;
    color: #746b80;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.65;
}

body.st-commercial-v4 .sc4-form-wrapper :where(input[type="text"], input[type="tel"], input[type="email"], textarea, select) {
    display: block;
    float: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 52px;
    margin: 0;
    padding: 15px 16px;
    border: 1px solid #eeebf3;
    border-radius: 12px;
    background: #f8f7fb;
    box-shadow: none;
    color: #51475e;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    text-align: left;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
    -webkit-appearance: none;
    appearance: none;
}

body.st-commercial-v4 .sc4-form-wrapper textarea {
    min-height: 98px;
    max-height: 220px;
    resize: vertical;
}

body.st-commercial-v4 .sc4-form-details {
    margin: 0 0 4px;
    border: 0;
}

body.st-commercial-v4 .sc4-form-details summary {
    width: fit-content;
    padding: 4px 0;
    color: var(--blue, #6352cf);
    cursor: pointer;
    font-size: 12px;
    font-weight: 550;
}

body.st-commercial-v4 .sc4-form-details[open] summary {
    margin-bottom: 10px;
}

body.st-commercial-v4 .sc4-form-wrapper :where(input, textarea)::placeholder {
    opacity: 1;
    color: #82758f;
    font-size: 12px;
}

body.st-commercial-v4 .sc4-form-wrapper :where(input[type="text"], input[type="tel"], input[type="email"], textarea, select):focus {
    border-color: #bfb1ea;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px #8e78d410;
}

body.st-commercial-v4 .sc4-form-wrapper :where(input, textarea).wpcf7-not-valid {
    border-color: #d994a4;
    background: #fffafb;
}

body.st-commercial-v4 .sc4-form-wrapper .wpcf7-not-valid-tip {
    display: block;
    margin: 6px 2px 0;
    color: #a34c63;
    font-size: 11px;
    line-height: 1.65;
}

body.st-commercial-v4 .sc4-consent,
body.st-commercial-v4 .sc4-form-wrapper .left-sidebar__form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    width: 100%;
    min-width: 0;
    margin: 3px 0 6px;
    padding: 0;
    color: #7a6b88;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.7;
}

body.st-commercial-v4 .sc4-consent :where(label, .wpcf7-list-item-label),
body.st-commercial-v4 .sc4-form-wrapper .left-sidebar__form-lable {
    display: block;
    width: auto;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    color: #7a6b88;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.7;
    text-align: left;
}

body.st-commercial-v4 .sc4-consent label:has(input[type="checkbox"]) {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0;
}

body.st-commercial-v4 .sc4-consent .wpcf7-list-item {
    display: block;
    margin: 0;
}

body.st-commercial-v4 .sc4-consent .wpcf7-list-item-label {
    flex: 1 1 auto;
}

/* Чат остаётся доступен, но не перекрывает поля во время ввода заявки. */
body.st-commercial-v4:has(#service-order:focus-within) jdiv {
    visibility: hidden;
}

body.st-commercial-v4 .sc4-form-wrapper .left-sidebar__form-lable::before,
body.st-commercial-v4 .sc4-form-wrapper .left-sidebar__form-lable::after {
    content: none;
}

body.st-commercial-v4 .sc4-consent input[type="checkbox"],
body.st-commercial-v4 .sc4-form-wrapper .left-form-check {
    position: static;
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    min-height: 0;
    margin: 1px 0 0;
    border: 1px solid #c8bfda;
    border-radius: 4px;
    opacity: 1;
    accent-color: var(--blue, #5146e5);
    cursor: pointer;
    -webkit-appearance: auto;
    appearance: auto;
}

body.st-commercial-v4 .sc4-consent a,
body.st-commercial-v4 .sc4-form-wrapper .sidebar__form-checkbox-link {
    color: #756087;
    font-size: inherit;
    line-height: inherit;
    text-decoration: underline;
    text-decoration-color: #d3c6e2;
    text-underline-offset: 3px;
}

body.st-commercial-v4 .sc4-consent a:hover {
    color: var(--blue, #5146e5);
    text-decoration-color: currentColor;
}

body.st-commercial-v4 .sc4-form-wrapper :where(input[type="submit"], button[type="submit"], .wpcf7-submit) {
    display: inline-flex;
    float: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 15px 20px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--blue, #5146e5);
    box-shadow: none;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.6;
    text-align: center;
    cursor: pointer;
    transition: background-color .18s ease, transform .18s ease;
    -webkit-appearance: none;
    appearance: none;
}

body.st-commercial-v4 .sc4-form-wrapper :where(input[type="submit"], button[type="submit"]):hover {
    background: var(--blue-dark, #3831b9);
    transform: translateY(-1px);
}

body.st-commercial-v4 .sc4-form-wrapper :where(input[type="submit"], button[type="submit"]):disabled,
body.st-commercial-v4 .sc4-form-wrapper form.submitting :where(input[type="submit"], button[type="submit"]) {
    opacity: .6;
    cursor: wait;
    transform: none;
}

body.st-commercial-v4 .sc4-form-wrapper .wpcf7-spinner {
    align-self: center;
    margin: 0 auto;
    background: #aca0c2;
}

body.st-commercial-v4 .sc4-form-wrapper .wpcf7-response-output {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #e3dbe9;
    border-radius: 11px;
    background: #faf7fc;
    color: #84738f;
    font-size: 12px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

body.st-commercial-v4 .sc4-form-wrapper .wpcf7-response-output[aria-hidden="true"] {
    display: none;
}

body.st-commercial-v4 .sc4-form-wrapper form.sent .wpcf7-response-output {
    border-color: #d2d9e7;
    background: #f4f7fb;
    color: #61748c;
}

body.st-commercial-v4 .sc4-form-wrapper form :where(input, textarea, button):focus-visible {
    outline: 2px solid #9c88d4;
    outline-offset: 3px;
}

@media (max-width: 1180px) {
    body.st-commercial-v4 .sc4-order-card {
        padding: 27px;
    }

    body.st-commercial-v4 .sc4-order-card h2 {
        font-size: 25px;
    }
}

@media (max-width: 980px) {
    body.st-commercial-v4 .sc4-order-card {
        width: 100%;
        padding: 30px;
    }
}

@media (max-width: 640px) {
    body.st-commercial-v4 .sc4-order-card {
        padding: 23px 20px;
        border-radius: 19px;
    }

    body.st-commercial-v4 .sc4-order-card h2 {
        font-size: 25px;
    }

    body.st-commercial-v4 .sc4-form-wrapper :where(input[type="text"], input[type="tel"], input[type="email"], textarea, select) {
        min-height: 50px;
        font-size: 14px;
    }

    body.st-commercial-v4 .sc4-form-wrapper :where(input[type="submit"], button[type="submit"]) {
        min-height: 51px;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.st-commercial-v4 .sc4-form-wrapper :where(input, button, textarea, select) {
        transition: none;
        animation: none;
    }
}
