/**
 * IABT Forms Styles
 *
 * Single owner for form-specific UI styles.
 * Global shared primitives (buttons/tokens) stay in the active theme.
 */

.iabt-form-wrapper {
    width: 100%;
}

.iabt-form-wrapper:not([data-form-type="contact"]) {
    width: 100%;
}

.iabt-form {
    width: 100%;
}

.iabt-form-wrapper:not([data-form-type="contact"]) > .iabt-form-page-title {
    margin: 0 0 12px;
    color: var(--iabt-text-heading);
    font-family: var(--iabt-font-family);
    font-size: clamp(var(--iabt-h3), 4vw, var(--iabt-h1));
    font-weight: var(--iabt-font-bold);
    line-height: var(--iabt-line-height-tight);
    letter-spacing: var(--iabt-letter-spacing-tight);
    text-align: center;
}

.iabt-form-wrapper:not([data-form-type="contact"]) .iabt-form-description {
    max-width: 860px;
    margin: 0 auto 30px;
    color: var(--iabt-text-body);
    font-family: var(--iabt-font-family);
    font-size: var(--iabt-text-lg);
    font-weight: var(--iabt-font-regular);
    line-height: var(--iabt-line-height-body);
    text-align: center;
}

.iabt-form-field {
    margin: 0;
    min-width: 0;
}

.iabt-segmented-card {
    width: 100%;
}

.iabt-stepper-progress {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    margin: 0 0 20px;
}

.iabt-stepper-item {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid transparent;
    background: transparent;
    color: inherit;
    cursor: pointer;
    position: relative;
    /* Override transition Coming for Falar Theme */
    transition: 0.25s ease;
}

.iabt-stepper-item-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}

.iabt-stepper-item-index,
.iabt-stepper-item-label {
    display: inline-block;
}

.iabt-stepper-item-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.iabt-stepper-item.is-locked {
    cursor: not-allowed;
}

.iabt-form-step {
    display: none;
}

.iabt-form-step.is-active {
    display: block;
}

.iabt-form-step.is-inactive {
    display: none;
}

.iabt-form-section {
    margin: 0 0 24px;
}

.iabt-form-section:last-of-type {
    margin-bottom: 0;
}

.iabt-form-section h3 {
    margin: 0 0 8px;
}

.iabt-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 16px 0;
}

.iabt-field-conditional {
    display: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, max-height 0.25s ease;
}

.iabt-field-conditional.iabt-field-visible {
    display: block;
    opacity: 1;
    max-height: 1200px;
}

.iabt-form-field label,
.iabt-repeater-nested-field label,
.iabt-group-nested-field label {
    display: block;
    margin: 8px 0 4px;
    padding: 0 6px;
    color: var(--iabt-text-heading);
    font-family: var(--iabt-font-family);
    font-size: var(--iabt-text-sm);
    font-weight: var(--iabt-font-semibold);
    letter-spacing: var(--iabt-ui-letter-spacing);
    line-height: var(--iabt-line-height-body);
}

.iabt-form-field .required {
    color: var(--iabt-error);
}

.iabt-input,
.iabt-textarea,
.iabt-select,
.iabt-file-input,
.iabt-table-input,
.iabt-table-select,
.iabt-other-text-input {
    width: 100%;
    height: auto;
    padding: 12px 14px;
    border: 1px solid hsl(var(--iabt-primary-hsl), 0.22);
    border-radius: 10px;
    background: var(--iabt-bg-main);
    color: var(--iabt-text-heading);
    font-family: var(--iabt-font-family);
    font-size: var(--iabt-text-base);
    font-weight: var(--iabt-font-regular);
    line-height: var(--iabt-line-height-body);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.iabt-textarea {
    resize: vertical;
}

.iabt-input::placeholder,
.iabt-textarea::placeholder,
.iabt-other-text-input::placeholder {
    color: var(--iabt-text-muted);
}

.iabt-input:focus,
.iabt-textarea:focus,
.iabt-select:focus,
.iabt-file-input:focus,
.iabt-table-input:focus,
.iabt-table-select:focus,
.iabt-other-text-input:focus {
    border-color: var(--iabt-accent);
    box-shadow: 0 0 0 3px var(--iabt-focus-ring);
    outline: none;
}

.iabt-file-hint,
.iabt-group-hint {
    margin-top: 6px;
    color: var(--iabt-text-muted);
    font-family: var(--iabt-font-family);
    font-size: var(--iabt-text-sm);
    font-style: normal;
    line-height: var(--iabt-line-height-body);
}

.field-error {
    margin-top: 4px;
    min-height: 20px;
    visibility: hidden;
    color: var(--iabt-error);
    font-size: var(--iabt-text-xs);
    line-height: var(--iabt-line-height-body);
    transition: visibility 0s, opacity 0.15s ease;
    opacity: 0;
    text-align: end;
    padding: 0 6px;
}

.iabt-form-field.has-error .field-error {
    visibility: visible;
    opacity: 1;
}

.iabt-form-field.has-error .iabt-input,
.iabt-form-field.has-error .iabt-select,
.iabt-form-field.has-error .iabt-textarea,
.iabt-form-field.has-error .iabt-file-input {
    border-color: var(--iabt-error);
}

.iabt-radio-group,
.iabt-checkbox-group {
    display: grid;
    gap: 10px;
}

.iabt-radio-group label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 4px 0;
    color: var(--iabt-text-body);
    font-size: var(--iabt-text-base);
    font-weight: var(--iabt-font-regular);
    line-height: var(--iabt-line-height-body);
    cursor: pointer;
}

.iabt-checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    color: var(--iabt-text-body);
    font-size: var(--iabt-text-base);
    font-weight: var(--iabt-font-regular);
}

.iabt-radio-group input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 2px solid hsl(var(--iabt-primary-hsl), 0.45);
    border-radius: 50%;
    background-color: var(--iabt-bg-main);
    position: relative;
    display: inline-block;
    vertical-align: middle;
    line-height: 0;
    flex-shrink: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.iabt-radio-group input[type="radio"]::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--iabt-primary);
    transform: translate(-50%, -50%) scale(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.iabt-radio-group input[type="radio"]:checked {
    border-color: var(--iabt-primary);
}

.iabt-radio-group input[type="radio"]:checked::before {
    transform: translate(-50%, -50%) scale(1);
}

.iabt-radio-group input[type="radio"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--iabt-focus-ring);
}

.iabt-checkbox-group input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--iabt-primary);
}

.iabt-checkbox-item {
    margin-bottom: 0;
}

.iabt-checkbox-expandable {
    padding: 12px 14px;
    border: 1px solid hsl(var(--iabt-primary-hsl), 0.2);
    border-left: 3px solid var(--iabt-primary);
    border-radius: 10px;
    background: hsl(var(--iabt-primary-hsl), 0.03);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.iabt-checkbox-expandable:hover {
    border-color: hsl(var(--iabt-primary-hsl), 0.4);
    background: hsl(var(--iabt-primary-hsl), 0.07);
}

.iabt-checkbox-other {
    border-left-color: var(--iabt-warning);
}

.iabt-checkbox-loading,
.iabt-no-options {
    margin: 0;
    padding: 10px 12px;
    color: var(--iabt-text-muted);
    font-size: var(--iabt-text-sm);
    background: hsl(var(--iabt-primary-hsl), 0.06);
    border-radius: 10px;
}

.iabt-additional-fields {
    margin-top: 12px;
    margin-left: 24px;
    padding: 16px;
    background: hsl(var(--iabt-blue-soft-hsl), 0.55);
    border: 1px solid hsl(var(--iabt-primary-hsl), 0.16);
    border-radius: 12px;
}

.iabt-additional-field {
    margin-bottom: 14px;
}

.iabt-additional-field:last-child {
    margin-bottom: 0;
}

.iabt-input-with-button {
    display: flex;
    align-items: center;
    gap: 10px;
}

.iabt-input-with-button .iabt-input {
    flex: 1 1 auto;
}

.iabt-verify-btn {
    white-space: nowrap;
}

.iabt-verification-result {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: var(--iabt-text-sm);
}

.iabt-verification-result.success {
    background: hsl(var(--iabt-success-hsl), 0.12);
    border-color: hsl(var(--iabt-success-hsl), 0.35);
}

.iabt-verification-result.error {
    background: hsl(var(--iabt-error-hsl), 0.1);
    border-color: hsl(var(--iabt-error-hsl), 0.35);
}

.iabt-verification-result .success-message,
.iabt-verification-result .discount-info,
.iabt-verification-result .promo-description {
    color: var(--iabt-success);
}

.iabt-verification-result .error-message {
    color: var(--iabt-error);
}

.iabt-verification-result .loading-message {
    color: var(--iabt-warning);
    margin: 0;
}

.iabt-form-message,
.iabt-form-error {
    margin: 20px 0;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: var(--iabt-text-sm);
    line-height: var(--iabt-line-height-body);
}

.iabt-form-message.success {
    background: hsl(var(--iabt-success-hsl), 0.12);
    border: 1px solid hsl(var(--iabt-success-hsl), 0.35);
    color: var(--iabt-success);
}

.iabt-form-message.error,
.iabt-form-error {
    background: hsl(var(--iabt-error-hsl), 0.1);
    border: 1px solid hsl(var(--iabt-error-hsl), 0.35);
    color: var(--iabt-error);
}

.iabt-form-message p {
    margin: 0 0 6px;
}

.iabt-form-message p:last-child {
    margin-bottom: 0;
}

.iabt-form-message ul {
    margin: 6px 0 0 18px;
    padding: 0;
}



.iabt-stepper-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.iabt-stepper-nav .iabt-step-prev {
    margin-right: auto;
}

.iabt-step-prev,
.iabt-step-next,
.iabt-submit-btn {
    min-width: 120px;
}

.iabt-submit-btn.is-submitting,
.iabt-submit-btn.is-submitting:hover {
    transform: none;
    box-shadow: none;
}

.iabt-submit-btn.is-submitting {
    cursor: progress;
}

.iabt-submit-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: iabt-spin 0.75s linear infinite;
}

@keyframes iabt-spin {
    to {
        transform: rotate(360deg);
    }
}

.iabt-repeater-container,
.iabt-group-container {
    margin: 18px 0;
    padding: 18px;
    border: 1px dashed hsl(var(--iabt-primary-hsl), 0.24);
    border-radius: 14px;
    background: hsl(var(--iabt-primary-hsl), 0.03);
}

.iabt-repeater-item,
.iabt-group-item {
    margin-bottom: 18px;
    padding: 18px;
    background: var(--iabt-bg-main);
    border: 1px solid hsl(var(--iabt-primary-hsl), 0.22);
    border-radius: 14px;
    box-shadow: 0 8px 22px hsl(var(--iabt-primary-hsl), 0.08);
}

.iabt-repeater-items,
.iabt-group-items {
    margin-bottom: 14px;
}

.iabt-group-item {
    border-color: hsl(var(--iabt-accent-hsl), 0.28);
}

.iabt-repeater-item-header,
.iabt-group-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid hsl(var(--iabt-primary-hsl), 0.18);
}

.iabt-repeater-item-title,
.iabt-group-item-title {
    margin: 0;
    color: var(--iabt-text-heading);
    font-family: var(--iabt-font-family);
    font-size: var(--iabt-text-lg);
    font-weight: var(--iabt-font-semibold);
}

.iabt-repeater-item-fields,
.iabt-group-item-fields {
    display: grid;
    gap: 14px;
}

.iabt-repeater-actions,
.iabt-group-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.iabt-repeater-template,
.iabt-group-template {
    display: none !important;
}

.iabt-group-hint {
    margin: 0;
}

.iabt-repeater-remove-btn .dashicons,
.iabt-group-remove-btn .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

.has-duplicate .iabt-select {
    border-color: var(--iabt-error);
    background: hsl(var(--iabt-error-hsl), 0.06);
}

.iabt-file-status {
    display: block;
    margin-top: 10px;
    font-size: var(--iabt-text-sm);
}

.iabt-file-status.uploading {
    color: var(--iabt-primary);
}

.iabt-file-status.uploaded {
    color: var(--iabt-success);
}

.iabt-file-status.error {
    color: var(--iabt-error);
}

.iabt-upload-icon.success {
    background-color: var(--iabt-success);
    color: var(--iabt-bg-main);
}

.iabt-upload-icon.error {
    background-color: var(--iabt-error);
    color: var(--iabt-bg-main);
}

.iabt-upload-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.iabt-upload-icon svg {
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.iabt-upload-spinner {
    border: 2px solid hsl(var(--iabt-primary-hsl), 0.2);
    border-top-color: var(--iabt-primary);
}

.iabt-file-uploaded-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: hsl(var(--iabt-blue-soft-hsl), 0.55);
    border: 1px solid hsl(var(--iabt-primary-hsl), 0.24);
    border-radius: 10px;
}

.iabt-file-uploaded-wrapper:hover {
    background: hsl(var(--iabt-blue-soft-hsl), 0.75);
    border-color: hsl(var(--iabt-primary-hsl), 0.38);
}

.iabt-file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.iabt-file-name {
    color: var(--iabt-text-heading);
    font-size: var(--iabt-text-sm);
    font-weight: var(--iabt-font-medium);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.iabt-remove-file-btn {
    flex-shrink: 0;
    padding: 6px 9px;
    border: 1px solid hsl(var(--iabt-primary-hsl), 0.24);
    border-radius: 8px;
    background: var(--iabt-bg-main);
    color: var(--iabt-text-muted);
}

.iabt-remove-file-btn svg {
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.iabt-upload-text {
    vertical-align: middle;
}

.iabt-remove-file-btn:hover {
    border-color: var(--iabt-error);
    background: hsl(var(--iabt-error-hsl), 0.08);
    color: var(--iabt-error);
}

.iabt-table-wrapper {
    margin: 16px 0;
    border: 1px solid hsl(var(--iabt-primary-hsl), 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 20px hsl(var(--iabt-primary-hsl), 0.06);
}

.iabt-table {
    background: var(--iabt-bg-main);
}

.iabt-table thead {
    background: hsl(var(--iabt-primary-hsl), 0.07);
}

.iabt-table thead th {
    color: var(--iabt-text-heading);
    font-size: var(--iabt-text-sm);
    font-weight: var(--iabt-font-semibold);
    border-bottom: 1px solid hsl(var(--iabt-primary-hsl), 0.2);
}

.iabt-table tbody tr {
    border-bottom: 1px solid hsl(var(--iabt-primary-hsl), 0.1);
}

.iabt-table tbody tr:hover {
    background: hsl(var(--iabt-accent-hsl), 0.06);
}

.iabt-table tbody td {
    padding: 12px;
    border-bottom: 1px solid hsl(var(--iabt-primary-hsl), 0.1);
}

.iabt-table tbody tr:last-child td {
    border-bottom: 0;
}

.iabt-table tbody td::before {
    color: var(--iabt-text-heading);
}

.iabt-prefill-warning {
    margin-top: 8px;
    padding: 10px 12px;
    background: hsl(var(--iabt-warning-hsl), 0.14);
    border: 1px solid hsl(var(--iabt-warning-hsl), 0.4);
    border-left: 4px solid var(--iabt-warning);
    border-radius: 10px;
    color: hsl(var(--iabt-warning-hsl), 0.98);
    font-size: var(--iabt-text-sm);
}

.iabt-prefill-warning .dashicons {
    color: var(--iabt-warning);
}

/* Segmented Figma-style rollout */
.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) {
    max-width: 1200px;
    margin: 0 auto;
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-progress {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0 0 34px;
    padding: 0;
    overflow: visible;
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item {
    --iabt-step-bg: hsl(var(--iabt-primary-hsl), 0.1);
    --iabt-step-color: var(--iabt-text-heading);
    flex: 1 1 0;
    min-height: 48px;
    padding: 0 12px 0 26px;
    margin-right: 4px;
    border: 0;
    border-radius: 0;
    background: var(--iabt-step-bg);
    color: var(--iabt-step-color);
    font-family: var(--iabt-font-family);
    font-size: var(--iabt-text-xs);
    font-weight: var(--iabt-font-semibold);
    letter-spacing: var(--iabt-ui-letter-spacing);
    line-height: 1;
    justify-content: center;
    position: relative;
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item:first-child {
    padding-left: 14px;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item:last-child {
    margin-right: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item::after {
    content: "";
    position: absolute;
    top: 0;
    right: -22px;
    width: 0;
    height: 0;
    border-top: 24px solid transparent;
    border-bottom: 24px solid transparent;
    border-left: 22px solid var(--iabt-step-bg);
    transition: 0.25s ease;
    z-index: 2;
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-top: 24px solid transparent;
    border-bottom: 24px solid transparent;
    border-left: 22px solid var(--iabt-bg-main);
    z-index: 1;
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item:first-child::before {
    display: none;
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item:last-child::after {
    display: none;
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item-index {
    min-width: auto;
    min-height: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: var(--iabt-text-xs);
    font-weight: var(--iabt-font-bold);
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item-label {
    color: inherit;
    line-height: var(--iabt-line-height-tight);
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item.is-active {
    --iabt-step-bg: var(--iabt-primary);
    --iabt-step-color: var(--iabt-bg-main);
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item.is-complete {
    --iabt-step-bg: hsl(var(--iabt-primary-hsl), 0.16);
    --iabt-step-color: var(--iabt-text-heading);
}


.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-segmented-card {
    background: var(--iabt-bg-main);
    border: 1px solid hsl(var(--iabt-primary-hsl), 0.16);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px hsl(var(--iabt-primary-hsl), 0.08);
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-form-section {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-form-section h3 {
    margin: 0;
    padding: 0 0 12px;
    border-bottom: 1px solid hsl(var(--iabt-primary-hsl), 0.16);
    color: var(--iabt-text-heading);
    font-family: var(--iabt-font-family);
    font-size: var(--iabt-h4);
    font-weight: var(--iabt-font-semibold);
    line-height: var(--iabt-line-height-heading);
    letter-spacing: var(--iabt-letter-spacing-tight);
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 8px;
}

.iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-form-field--full {
    grid-column: 1 / -1;
}


/* Non-segmented (preserve stable visual language) */
.iabt-form-wrapper[data-segmented="0"]:not([data-form-type="contact"]) {
    max-width: 900px;
    margin: 0 auto;
}

.iabt-form-wrapper[data-segmented="0"]:not([data-form-type="contact"]) .iabt-form-section {
    margin: 0 0 24px;
    padding: 22px;
    border: 1px solid hsl(var(--iabt-primary-hsl), 0.14);
    border-radius: 14px;
    background: var(--iabt-bg-main);
    box-shadow: 0 8px 20px hsl(var(--iabt-primary-hsl), 0.05);
}

.iabt-form-wrapper[data-segmented="0"]:not([data-form-type="contact"]) .iabt-form-section:last-of-type {
    margin-bottom: 0;
}

.iabt-form-wrapper[data-segmented="0"]:not([data-form-type="contact"]) .iabt-form-section h3 {
    margin: 0 0 12px;
    color: var(--iabt-text-heading);
    font-size: var(--iabt-h5);
    border-bottom: 1px solid hsl(var(--iabt-primary-hsl), 0.12);
    padding-bottom: 10px;
}

[data-form-type="contact"].iabt-form-wrapper {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

[data-form-type="contact"] .iabt-form-section {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

[data-form-type="contact"] .iabt-form-section:first-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
}

[data-form-type="contact"] .iabt-form-section:first-child .iabt-form-field {
    display: block;
    width: auto;
    margin-right: 0;
}

.iabt-form-submit {
    width: fit-content;
    justify-self: end;
}

@media (max-width: 1100px) {
    .iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-progress {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item {
        min-height: 46px;
        margin-right: 0;
        padding: 12px 14px;
        border-radius: 10px;
        justify-content: flex-start;
    }

    .iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item::before,
    .iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item::after {
        display: none;
    }

    .iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-stepper-item-content {
        white-space: normal;
        justify-content: flex-start;
        text-align: left;
    }

    .iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-segmented-card {
        padding: 24px;
    }
}

@media (max-width: 960px) {
    .iabt-form-wrapper:not([data-form-type="contact"]) > .iabt-form-page-title {
        font-size: clamp(var(--iabt-h4), 7vw, var(--iabt-h2));
    }

    .iabt-step-prev,
    .iabt-step-next,
    .iabt-submit-btn {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .iabt-form-wrapper:not([data-form-type="contact"]) .iabt-form-description {
        margin-bottom: 22px;
        font-size: var(--iabt-text-base);
    }

    .iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-segmented-card {
        padding: 18px;
        border-radius: 14px;
    }

    .iabt-form-wrapper[data-segmented="1"]:not([data-form-type="contact"]) .iabt-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .iabt-stepper-nav {
        flex-direction: column-reverse;
        align-items: stretch;
        width: 100%;
    }

    .iabt-stepper-nav .iabt-step-prev {
        margin-right: 0;
    }

    .iabt-step-prev,
    .iabt-step-next,
    .iabt-submit-btn,
    .iabt-repeater-add-btn,
    .iabt-group-add-btn,
    .iabt-verify-btn,
    .iabt-repeater-remove-btn,
    .iabt-group-remove-btn {
        width: 100%;
        justify-content: center;
    }

    .iabt-input-with-button {
        flex-direction: column;
        align-items: stretch;
    }

    .iabt-repeater-item,
    .iabt-group-item,
    .iabt-repeater-container,
    .iabt-group-container {
        padding: 14px;
    }

    .iabt-repeater-item-header,
    .iabt-group-item-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .iabt-table tbody tr {
        border: 1px solid hsl(var(--iabt-primary-hsl), 0.2);
        border-radius: 12px;
        background: var(--iabt-bg-main);
        box-shadow: 0 6px 14px hsl(var(--iabt-primary-hsl), 0.08);
    }

    .iabt-table tbody td {
        border-bottom: 1px solid hsl(var(--iabt-primary-hsl), 0.1);
    }

    .iabt-table tbody td:last-child {
        border-bottom: 0;
    }

    [data-form-type="contact"] .iabt-form-section:first-child {
        grid-template-columns: 1fr;
    }
}
