body.ctm-qbs-open {
    overflow: hidden !important;
}

.ctm-qbs-modal,
.ctm-qbs-modal * {
    box-sizing: border-box;
}

.ctm-qbs-modal[hidden],
.ctm-qbs-modal [hidden] {
    display: none !important;
}

.ctm-qbs-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    padding: 16px;
    color: #111827;
    font-family: var(--ctm-font-body, "Manrope", system-ui, sans-serif);
    font-size: 17px;
    font-weight: 500;
}

.ctm-qbs-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.68);
}

.ctm-qbs-dialog {
    position: relative;
    width: min(920px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #d7dadd;
    border-radius: 8px;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.ctm-qbs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e4e6e8;
    background: #ffffff;
}

.ctm-qbs-header h2,
.ctm-qbs-step-heading h3,
.ctm-qbs-success h3,
.ctm-qbs-tv h4 {
    margin: 0;
    color: #101820;
    font-family: var(--ctm-font-heading, "Sora", system-ui, sans-serif) !important;
    letter-spacing: 0;
}

.ctm-qbs-header h2 {
    font-size: 25px;
    line-height: 1.2;
}

.ctm-qbs-kicker,
.ctm-qbs-eyebrow {
    margin: 0 0 5px;
    color: #a45400;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.ctm-qbs-close {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #cfd3d7;
    border-radius: 50%;
    background: #ffffff;
    color: #101820;
    font-size: 29px !important;
    line-height: 1;
    cursor: pointer;
}

.ctm-qbs-close:hover,
.ctm-qbs-close:focus-visible {
    background: #f4f5f6;
    border-color: #101820;
}

.ctm-qbs-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 0 24px;
    border-bottom: 1px solid #e4e6e8;
    background: #f7f8f9;
}

.ctm-qbs-progress span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    border-bottom: 3px solid transparent;
    color: #5b6269;
    font-size: 14px;
    white-space: nowrap;
}

.ctm-qbs-progress b {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: 1px solid #aeb4ba;
    border-radius: 50%;
    background: #ffffff;
    color: #40474e;
    font-size: 12px;
}

.ctm-qbs-progress .is-active {
    border-bottom-color: #f59e0b;
    color: #101820;
    font-weight: 800;
}

.ctm-qbs-progress .is-active b,
.ctm-qbs-progress .is-complete b {
    border-color: #101820;
    background: #101820;
    color: #ffffff;
}

.ctm-qbs-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    max-height: calc(100dvh - 174px);
    overflow: auto;
}

.ctm-qbs-form {
    min-width: 0;
    padding: 26px 28px 24px;
}

.ctm-qbs-step {
    min-height: 330px;
}

.ctm-qbs-step-heading {
    margin-bottom: 22px;
}

.ctm-qbs-step-heading h3,
.ctm-qbs-success h3 {
    font-size: 22px;
    line-height: 1.3;
}

.ctm-qbs-field {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: #252b31;
    font-size: 14px;
    font-weight: 700;
}

.ctm-qbs-field > span {
    line-height: 1.3;
}

.ctm-qbs-field small {
    color: #697078;
    font-weight: 500;
}

.ctm-qbs-field input,
.ctm-qbs-field select,
.ctm-qbs-field textarea {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #b8bec4;
    border-radius: 6px;
    background: #ffffff;
    color: #101820;
    font: inherit;
    font-size: 16px !important;
    font-weight: 500 !important;
    line-height: 1.35;
}

.ctm-qbs-field textarea {
    min-height: 78px;
    resize: vertical;
}

.ctm-qbs-field input:focus,
.ctm-qbs-field select:focus,
.ctm-qbs-field textarea:focus {
    outline: 3px solid rgba(245, 158, 11, 0.25);
    border-color: #a45400;
}

.ctm-qbs-count-field {
    width: min(210px, 100%);
    margin-bottom: 20px;
}

.ctm-qbs-tv-list {
    border-top: 1px solid #dfe2e5;
}

.ctm-qbs-tv {
    padding: 18px 0;
    border-bottom: 1px solid #dfe2e5;
}

.ctm-qbs-tv h4 {
    margin-bottom: 12px;
    font-size: 16px;
}

.ctm-qbs-tv-fields,
.ctm-qbs-fields-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ctm-qbs-fields-two {
    margin-bottom: 16px;
}

.ctm-qbs-field-wide {
    grid-column: 1 / -1;
}

.ctm-qbs-consent {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin-top: 18px;
    color: #343a40;
    font-size: 13px;
    line-height: 1.5;
}

.ctm-qbs-consent input {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: #f59e0b;
}

.ctm-qbs-form-error {
    margin-top: 18px;
    padding: 11px 12px;
    border-left: 4px solid #b42318;
    background: #fff1f0;
    color: #8a1c13;
    font-size: 14px;
}

.ctm-qbs-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e1e4e7;
}

.ctm-qbs-primary,
.ctm-qbs-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 20px;
    border-radius: 6px;
    font-family: var(--ctm-font-body, "Manrope", system-ui, sans-serif) !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
}

.ctm-qbs-primary {
    border: 1px solid #d98400;
    background: #f59e0b;
    color: #111111;
}

.ctm-qbs-primary:hover,
.ctm-qbs-primary:focus-visible {
    background: #facc15;
    border-color: #b77b00;
}

.ctm-qbs-primary:disabled {
    cursor: wait;
    opacity: 0.65;
}

.ctm-qbs-secondary {
    border: 1px solid #b8bec4;
    background: #ffffff;
    color: #20262c;
}

.ctm-qbs-secondary:hover,
.ctm-qbs-secondary:focus-visible {
    background: #f3f4f5;
    border-color: #747c84;
}

.ctm-qbs-summary {
    align-self: stretch;
    padding: 28px 22px;
    border-left: 1px solid #e0e3e6;
    background: #f7f8f9;
}

.ctm-qbs-summary > p {
    margin: 0 0 4px;
    color: #5f666d;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.ctm-qbs-summary > strong {
    display: block;
    margin: 0;
    color: #101820;
    font-family: var(--ctm-font-heading, "Sora", system-ui, sans-serif);
    font-size: 42px;
    line-height: 1.15;
}

.ctm-qbs-summary > span {
    display: block;
    margin-top: 4px;
    color: #545b62;
    font-size: 14px;
}

.ctm-qbs-summary ul {
    display: grid;
    gap: 8px;
    margin: 22px 0;
    padding: 18px 0;
    border-top: 1px solid #d7dade;
    border-bottom: 1px solid #d7dade;
    list-style: none;
}

.ctm-qbs-summary li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #444b52;
    font-size: 13px;
}

.ctm-qbs-summary li b {
    color: #101820;
}

.ctm-qbs-summary > small {
    display: block;
    color: #616970;
    font-size: 12px;
    line-height: 1.55;
}

.ctm-qbs-success {
    grid-column: 1 / -1;
    max-width: 620px;
    margin: 0 auto;
    padding: 56px 32px 60px;
    text-align: center;
}

.ctm-qbs-success-mark {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #176b45;
    color: #ffffff;
    font-size: 30px;
    font-weight: 800;
}

.ctm-qbs-success p:not(.ctm-qbs-eyebrow):not(.ctm-qbs-reference) {
    margin: 14px auto 0;
    color: #4d555c;
    line-height: 1.65;
}

.ctm-qbs-reference {
    margin: 14px 0 24px;
    color: #5e666d;
    font-size: 14px;
}

.ctm-qbs-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 740px) {
    .ctm-qbs-modal {
        padding: 0;
    }

    .ctm-qbs-dialog {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .ctm-qbs-header {
        padding: 15px 16px 12px;
    }

    .ctm-qbs-header h2 {
        font-size: 20px;
    }

    .ctm-qbs-progress {
        padding: 0 10px;
    }

    .ctm-qbs-progress span {
        gap: 5px;
        min-height: 48px;
        font-size: 11px;
    }

    .ctm-qbs-progress b {
        width: 21px;
        height: 21px;
        font-size: 11px;
    }

    .ctm-qbs-content {
        grid-template-columns: minmax(0, 1fr);
        max-height: calc(100dvh - 132px);
    }

    .ctm-qbs-form {
        padding: 22px 18px 150px;
    }

    .ctm-qbs-step {
        min-height: 0;
    }

    .ctm-qbs-tv-fields,
    .ctm-qbs-fields-two {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .ctm-qbs-field-wide {
        grid-column: auto;
    }

    .ctm-qbs-summary {
        position: sticky;
        bottom: 0;
        z-index: 2;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 0 14px;
        padding: 13px 18px calc(13px + env(safe-area-inset-bottom));
        border-top: 1px solid #d9dcdf;
        border-left: 0;
        box-shadow: 0 -8px 18px rgba(0, 0, 0, 0.08);
    }

    .ctm-qbs-summary > p,
    .ctm-qbs-summary > span {
        grid-column: 1;
    }

    .ctm-qbs-summary > strong {
        grid-column: 2;
        grid-row: 1 / span 2;
        font-size: 32px;
    }

    .ctm-qbs-summary ul,
    .ctm-qbs-summary > small {
        display: none;
    }

    .ctm-qbs-actions {
        position: fixed;
        right: 0;
        bottom: 74px;
        left: 0;
        z-index: 3;
        margin: 0;
        padding: 10px 18px;
        border-top: 1px solid #d9dcdf;
        background: #ffffff;
    }

    .ctm-qbs-actions button {
        flex: 1;
    }

    .ctm-qbs-success {
        padding: 48px 22px 60px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ctm-qbs-modal * {
        scroll-behavior: auto !important;
    }
}
