.tse-sq {
    --tse-sq-arrow: #354133;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 30px;
    overflow: visible;
    color: #263024;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.tse-sq *,
.tse-sq *::before,
.tse-sq *::after {
    box-sizing: border-box;
}

.tse-sq__form,
.tse-sq__grid,
.tse-sq__field {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.tse-sq__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
}

.tse-sq__field {
    grid-column: auto;
    width: 100%;
}

.tse-sq__field--full {
    grid-column: 1 / -1;
}

.tse-sq__field {
    position: relative;
    display: flex;
    flex-direction: column;
}

.tse-sq__label {
    display: block;
    margin: 0 0 8px;
    color: #263024;
    font-weight: 600;
    line-height: 1.4;
}

.tse-sq__required {
    color: #b42318;
}

.tse-sq input[type="text"],
.tse-sq input[type="email"],
.tse-sq input[type="search"],
.tse-sq input[type="tel"],
.tse-sq input[type="date"],
.tse-sq input[type="number"],
.tse-sq select,
.tse-sq textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 12px 15px;
    color: #263024;
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
    background-color: #fff;
    border: 1px solid #cbd4c5;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(31, 48, 29, .03);
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.tse-sq input::placeholder,
.tse-sq textarea::placeholder {
    color: #737c70;
    opacity: 1;
}

.tse-sq select {
    padding-right: 40px;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--tse-sq-arrow) 50%),
        linear-gradient(135deg, var(--tse-sq-arrow) 50%, transparent 50%);
    background-position:
        calc(100% - 19px) 50%,
        calc(100% - 13px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.tse-sq textarea {
    min-height: 140px;
    resize: vertical;
}

.tse-sq input:hover,
.tse-sq select:hover,
.tse-sq textarea:hover {
    border-color: #aebba7;
}

.tse-sq input:focus,
.tse-sq select:focus,
.tse-sq textarea:focus {
    outline: 2px solid transparent;
    background-color: #fff;
    border-color: #68a522;
    box-shadow: 0 0 0 3px rgba(104, 165, 34, .18);
}

.tse-sq [aria-invalid="true"] {
    border-color: #b42318;
    box-shadow: 0 0 0 3px rgba(180, 35, 24, .12);
}

.tse-sq__phone {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.tse-sq__phone input {
    min-width: 0;
}

.tse-sq__country-control,
.tse-sq__country-combobox {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.tse-sq__country-combobox {
    display: none;
}

.tse-sq--enhanced .tse-sq__country-combobox {
    display: block;
}

.tse-sq--enhanced .tse-sq__country-native {
    display: none;
}

.tse-sq__country-listbox {
    position: absolute;
    z-index: 20;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    max-height: 260px;
    overflow-y: auto;
    color: #263024;
    background: #fff;
    border: 1px solid #cbd4c5;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(31, 48, 29, .14);
}

.tse-sq__country-listbox[hidden] {
    display: none;
}

.tse-sq__country-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 44px;
    padding: 10px 14px;
    cursor: pointer;
}

.tse-sq__country-option[hidden] {
    display: none;
}

.tse-sq__country-option small {
    color: #697365;
    font-size: .88em;
    white-space: nowrap;
}

.tse-sq__country-option:hover,
.tse-sq__country-option.is-active {
    background: #f1f6ec;
}

.tse-sq__country-option[aria-selected="true"] {
    background: #e7f2dc;
    font-weight: 600;
}

.tse-sq__country-option.is-suggested {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.tse-sq__country-option.is-suggested::before {
    grid-column: 1 / -1;
    content: attr(data-suggested-label);
    color: #697365;
    font-size: .78em;
    font-weight: 600;
    line-height: 1.2;
}

.tse-sq__country-option.is-suggested[hidden] {
    display: none;
}

.tse-sq [data-tse-sq-stage="budget"] {
    grid-column: 2;
}

.tse-sq__dial {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 11px;
    color: #4e584a;
    background: #f1f4ee;
    border: 1px solid #cbd4c5;
    border-radius: 8px;
    white-space: nowrap;
}

.tse-sq__consent {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px 11px;
    align-items: start;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.tse-sq__consent input[type="checkbox"] {
    width: 21px;
    height: 21px;
    min-height: 0;
    margin: 1px 0 0;
    padding: 0;
    accent-color: #68a522;
}

.tse-sq__consent-label {
    min-width: 0;
    color: #394336;
    line-height: 1.55;
}

.tse-sq__consent-label a {
    color: #4f8519;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tse-sq__consent-label a:hover,
.tse-sq__consent-label a:focus {
    color: #345e0b;
}

.tse-sq__consent .tse-sq__error {
    grid-column: 2;
}

.tse-sq__trust {
    display: flex;
    flex-wrap: wrap;
    align-self: center;
    justify-content: space-between;
    gap: 10px 20px;
    color: #596454;
    font-size: .94em;
}

.tse-sq [data-tse-sq-stage="consent"] {
    grid-column: 1;
}

.tse-sq [data-tse-sq-stage="trust"] {
    grid-column: 2;
}

.tse-sq__trust-icon {
    color: #68a522;
}

.tse-sq__submit {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-height: 54px;
    margin: 0;
    padding: 15px 24px;
    overflow-wrap: anywhere;
    color: #fff !important;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    letter-spacing: .025em;
    background: #202a20 !important;
    border: 1px solid #202a20 !important;
    border-radius: 8px;
    box-shadow: none;
    cursor: pointer;
    appearance: none;
    touch-action: manipulation;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.tse-sq__submit *,
.tse-sq__submit:visited,
.tse-sq__submit:visited * {
    color: inherit !important;
}

.tse-sq__submit:hover,
.tse-sq__submit:focus,
.tse-sq__submit:active {
    color: #fff !important;
    background: #121a12 !important;
    border-color: #121a12 !important;
    text-decoration: none !important;
    box-shadow: 0 6px 16px rgba(18, 26, 18, .16);
}

.tse-sq__submit:hover {
    transform: translateY(-1px);
}

.tse-sq__submit:hover *,
.tse-sq__submit:focus *,
.tse-sq__submit:active * {
    color: inherit !important;
}

.tse-sq__submit:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 3px;
}

.tse-sq__submit:disabled {
    cursor: not-allowed;
    opacity: .62;
    box-shadow: none;
    transform: none;
}

.tse-sq.is-submitting .tse-sq__submit:disabled {
    cursor: wait;
}

.tse-sq__error {
    display: none;
    margin-top: 6px;
    color: #b42318;
    font-size: .875rem;
    line-height: 1.4;
}

.tse-sq__error.is-visible {
    display: block;
}

.tse-sq__response {
    display: none;
    margin: 0 0 22px;
    padding: 14px 16px;
    color: #355b19;
    background: #f1f8e9;
    border: 1px solid #b8d993;
    border-radius: 8px;
    line-height: 1.5;
}

.tse-sq__response:not(:empty),
.tse-sq__response.is-visible {
    display: block;
}

.tse-sq__response.is-error {
    color: #8f1d16;
    background: #fff1f0;
    border-color: #efaaa5;
}

.tse-sq--enhanced .is-stage-locked input:disabled,
.tse-sq--enhanced .is-stage-locked select:disabled,
.tse-sq--enhanced .is-stage-locked textarea:disabled {
    color: #687164;
    -webkit-text-fill-color: #687164;
    background-color: #f1f3ef;
    border-color: #cfd6ca;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 1;
}

.tse-sq--enhanced .is-stage-locked input:disabled::placeholder,
.tse-sq--enhanced .is-stage-locked textarea:disabled::placeholder {
    color: #858d81;
    -webkit-text-fill-color: #858d81;
    opacity: 1;
}

.tse-sq--enhanced .is-stage-locked .tse-sq__dial {
    color: #737b70;
    background-color: #ecefeb;
    border-color: #cfd6ca;
}

.tse-sq--enhanced .is-stage-locked.tse-sq__consent {
    background-color: transparent;
    border-color: transparent;
}

.tse-sq--enhanced .is-stage-locked .tse-sq__consent-label {
    color: #687164;
}

.tse-sq--enhanced .is-stage-locked input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: .75;
}

.tse-sq__honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    pointer-events: none !important;
}

@media (max-width: 1024px) {
    .tse-sq { padding: 20px; }
}

@media (max-width: 767px) {
    .tse-sq {
        padding: 15px;
    }

    .tse-sq__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 17px;
    }

    .tse-sq__field,
    .tse-sq__field--full,
    .tse-sq__name-wrap {
        grid-column: 1;
    }

    .tse-sq [data-tse-sq-stage="budget"],
    .tse-sq [data-tse-sq-stage="consent"],
    .tse-sq [data-tse-sq-stage="trust"] {
        grid-column: 1;
    }

    .tse-sq__phone {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 6px;
    }

    .tse-sq input,
    .tse-sq select,
    .tse-sq textarea {
        font-size: 16px;
    }

    .tse-sq__trust {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 430px) {
    .tse-sq__phone { grid-template-columns: 88px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .tse-sq input,
    .tse-sq select,
    .tse-sq textarea,
    .tse-sq__submit {
        transition: none !important;
    }
}
