/*
         * :where(.elementor-widget-wiz_v2_signup_form) scopes every rule to
         * the widget wrapper WITHOUT adding specificity (0,0,0 contribution).
         * This replaces the previous pattern of duplicating each selector
         * once with the prefix and once bare.  The result is identical
         * specificity to a bare class selector while keeping cascade scope
         * tight to the widget.
         */

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-form-container {
            width: 100%;
            max-width: 600px;
            margin: 0 auto;
            padding: 0;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-progress {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 32px;
            gap: 0;
            width: 100%;
            position: relative;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-progress-step {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            flex: 0 0 auto;
            position: relative;
            z-index: 1;
            cursor: pointer;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-progress-circle {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 16px;
            border: 2px solid var(--primary);
            background-color: var(--secondary-light);
            color: var(--primary);
            flex-shrink: 0;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-progress-step.active .wiz-v2-signup-progress-circle {
            background: var(--primary);
            color: #ffffff;
            border-color: var(--primary);
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-progress-label {
            font-size: 12px;
            font-weight: 600;
            color: #6b7280;
            text-align: center;
            white-space: nowrap;
            line-height: 1.2;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-progress-step.active .wiz-v2-signup-progress-label {
            color: #000000;
            font-weight: 700;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-progress::before {
            content: '';
            position: absolute;
            top: 40%;
            left: calc(var(--stepper-circle-size, 40px) / 2);
            right: calc(var(--stepper-circle-size, 40px) / 2);
            height: 0;
            border-top-width: 2px;
            border-top-style: solid;
            border-top-color: #d1d5db;
            z-index: 0;
            transform: translateY(-50%);
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-progress-connector {
            display: none;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-steps-container {
            position: relative;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step {
            display: none;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step.active {
            display: block;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-title {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 24px;
            color: #000000;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-sections {
            display: flex;
            flex-direction: column;
            width: 100%;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-fields-wrapper {
            display: flex;
            flex-direction: column;
            gap: 16px;
            width: 100%;
        }

        /* ── Field Layout Groups (multi-column) ────────────────────────────── */
        :where(.elementor-widget-wiz_v2_signup_form) .fb-fields-outer {
            display: flex;
            flex-direction: column;
            gap: var(--wiz-signup-field-row-gap, 16px);
            width: 100%;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .fb-field-group {
            display: flex;
            flex-wrap: nowrap;
            align-items: flex-start;
            gap: var(--wiz-signup-group-gap, 16px);
            width: 100%;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .fb-field-group-item > .form-builder-with-rule {
            width: 100%;
        }

        @media (max-width: 767px) {
            /*
             * On mobile, field groups always stack to a single column.
             *
             * :where() keeps specificity at (0,1,0) — same as a single class —
             * which is sufficient because the only inline style on .fb-field-group
             * is the --wiz-signup-group-gap custom property (never competes with
             * layout properties).
             *
             * .fb-fields-outer row-gap is intentionally omitted — the
             * field_groups_row_gap responsive control (add_responsive_control)
             * owns that value at every breakpoint.
             *
             * .fb-field-group-item inline styles (flex:0 0 Xpx; min-width:0)
             * are inert once the parent is display:block, so no override needed.
             */
            :where(.elementor-widget-wiz_v2_signup_form) .fb-field-group {
                display: block;
                gap: 0;
                width: 100%;
                max-width: 100%;
            }

            :where(.elementor-widget-wiz_v2_signup_form) .fb-field-group > .fb-field-group-item {
                display: block;
                flex: 1 1 100%;
                width: 100%;
                max-width: 100%;
                min-width: 0;
                margin-bottom: var(--wiz-signup-group-gap, 16px);
            }

            :where(.elementor-widget-wiz_v2_signup_form) .fb-field-group > .fb-field-group-item:last-child {
                margin-bottom: 0;
            }
        }
        /* ─────────────────────────────────────────────────────────────────── */

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-sections .form-builder-with-rule {
            width: 100%;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-sections .form-builder-with-rule input,
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-sections .form-builder-with-rule select,
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-sections .form-builder-with-rule textarea {
            /* width: 100% !important; */
            box-sizing: border-box;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-section {
            margin-bottom: var(--wiz-signup-section-gap, 32px);
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-section-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 16px;
            color: #000000;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-address-section {
            margin-bottom: 0px;
        }

        /* Standalone address-section titles (no heading-cluster wrapper) —
           bottom margin uses --wiz-signup-section-gap (CSS default only;
           no Elementor control writes this token today). */
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-address-section > .wiz-v2-signup-section-title {
            margin: 0 0 var(--wiz-signup-section-gap, 14px) 0;
        }

        /* Side-by-side address columns */
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-address-columns {
            display: flex;
            align-items: flex-start;
            gap: var(--wiz-signup-address-col-gap, 24px);
            width: 100%;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-address-columns > .wiz-v2-signup-section {
            flex: 1;
            min-width: 0;
        }

        /*
         * Side-by-side: shipping heading + autofill checkbox — base is inline (row).
         * .wiz-v2-signup-stack-desktop / -tablet / -mobile are toggled from PHP from the
         * responsive "Stack Checkbox Below Heading" control (desktop-first breakpoints).
         */
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-autofill-heading-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin: 0 0 var(--wiz-signup-autofill-margin, 14px) 0;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-autofill-heading-row .wiz-v2-signup-section-title {
            margin: 0;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-autofill-heading-row .wiz-v2-signup-autofill-checkbox {
            margin: 0;
        }

        @media (min-width: 1025px) {
            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-autofill-heading-row.wiz-v2-signup-stack-desktop {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }
        }

        @media (min-width: 768px) and (max-width: 1024px) {
            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-autofill-heading-row.wiz-v2-signup-stack-tablet {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }
        }

        /*
         * Billing: structurally identical hidden checkbox row — visible only at breakpoints
         * where shipping uses stacked heading+checkbox, so both columns stay aligned.
         */
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-billing-heading-cluster {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 8px;
            margin: 0 0 var(--wiz-signup-section-gap, 20px) 0;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-billing-heading-cluster .wiz-v2-signup-section-title {
            margin: 0;
        }

        @media (min-width: 1025px) {
            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-billing-heading-cluster.wiz-show-billing-spacer-d {
                margin: 0 0 7px 0;
            }
        }

        @media (min-width: 768px) and (max-width: 1024px) {
            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-billing-heading-cluster.wiz-show-billing-spacer-t {
                margin: 0 0 14px 0;
            }
        }

        @media (max-width: 767px) {
            /*
             * On mobile, "Address: Side by Side" is ignored — always stack
             * billing and shipping one-per-row, full width.
             *
             * :where() keeps specificity identical to a bare class selector;
             * cascade order (widget <style> renders after Elementor's <head>
             * CSS) ensures these rules win cleanly.
             *
             * The autofill heading-row rules carry inherently high specificity
             * (attribute selector + :not pseudo-class + element + combinators)
             * and override the base .wiz-v2-signup-autofill-heading-row rule
             * without !important.
             */
            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-address-columns {
                display: block;
                flex-direction: column;
                align-items: stretch;
                gap: 0;
                width: 100%;
            }

            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-address-columns > .wiz-v2-signup-section {
                display: block;
                flex: 0 0 100%;
                width: 100%;
                max-width: 100%;
                min-width: 0;
                margin-bottom: var(--wiz-signup-address-col-gap, 24px);
            }

            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-address-columns > .wiz-v2-signup-section:last-child {
                margin-bottom: 0;
            }

            /*
             * When "Address: Side by Side" is ON, the shipping heading row is normally
             * title + checkbox inline. On mobile (single-column addresses) we default to
             * column-reverse so the checkbox sits above the title (between billing and
             * shipping blocks). If the responsive control enables "stack below heading"
             * for mobile (.wiz-v2-signup-stack-mobile), use normal column order instead.
             */
            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-address-section[data-address-type="shipping"] > div.wiz-v2-signup-autofill-heading-row:not(.wiz-v2-signup-stack-mobile) {
                display: flex;
                flex-direction: column-reverse;
                align-items: stretch;
                justify-content: flex-start;
                gap: 16px;
                margin: 0 0 var(--wiz-signup-autofill-margin, 16px) 0;
            }

            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-address-section[data-address-type="shipping"] > div.wiz-v2-signup-autofill-heading-row.wiz-v2-signup-stack-mobile {
                display: flex;
                flex-direction: column;
                align-items: stretch;
                justify-content: flex-start;
                gap: 16px;
                margin: 0 0 var(--wiz-signup-autofill-margin, 16px) 0;
            }

            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-address-section[data-address-type="shipping"] > div.wiz-v2-signup-autofill-heading-row > .wiz-v2-signup-section-title {
                margin: 0;
                width: 100%;
            }

            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-address-section[data-address-type="shipping"] .wiz-v2-signup-autofill-heading-row .wiz-v2-signup-autofill-checkbox {
                margin: 0;
                padding: 0;
                width: 100%;
            }
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-autofill-checkbox {
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /*
         * Billing alignment spacer — hidden by default, shown at breakpoints
         * where the shipping heading uses stacked heading+checkbox so both
         * columns stay vertically aligned.
         *
         * The spacer has its own class (.wiz-v2-signup-billing-spacer-sync) and
         * does NOT share .wiz-v2-signup-autofill-checkbox, so there is no need
         * for !important overrides.
         */
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-billing-spacer-sync {
            display: none;
            align-items: center;
            gap: 8px;
            margin: 0;
            visibility: hidden;
        }

        @media (min-width: 1025px) {
            :where(.elementor-widget-wiz_v2_signup_form) .wiz-show-billing-spacer-d .wiz-v2-signup-billing-spacer-sync {
                display: flex;
                visibility: hidden;
            }
        }

        @media (min-width: 768px) and (max-width: 1024px) {
            :where(.elementor-widget-wiz_v2_signup_form) .wiz-show-billing-spacer-t .wiz-v2-signup-billing-spacer-sync {
                display: flex;
                visibility: hidden;
            }
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-checkbox {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-buttons {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 32px;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 24px;
            border: none;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: opacity 0.2s;
            background-color: var(--primary);
            color: #ffffff;
            text-transform: none;
        }

        /* Icon normalisation — works for both Font Awesome <i> and Elementor SVG icons */
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-button i,
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-button svg {
            display: inline-block;
            width: 1em;
            height: 1em;
            font-size: inherit;
            flex-shrink: 0;
            line-height: 1;
            /* SVG icons: make fill and stroke follow the button's text color */
            fill: currentColor;
            stroke: currentColor;
        }

        /* Elementor SVG icons that intentionally have fill:none use stroke, keep that */
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-button svg path,
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-button svg circle,
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-button svg rect,
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-button svg line,
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-button svg polyline,
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-button svg polygon {
            fill: inherit;
            stroke: inherit;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-button:hover {
            opacity: 0.9;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-button:disabled {
            opacity: 0.6;
            cursor: pointer;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-skip-continue {
            background-color: transparent;
            color: var(--primary);
            border: 1px solid var(--primary);
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-skip-continue:hover {
            background-color: #f9fafb;
        }

        /* Attachments section styles - Matching image 1 design */
        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachments-section {
            margin-top: 24px;
            border: 1px dashed #d1d5db;
            padding: 16px;
            background-color: #ffffff;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachments-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            margin-bottom: 0;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachments-header-left {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachments-title {
            font-size: 14px;
            color: #111827;
            font-weight: 600;
            line-height: 1.5;
            margin: 0;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachments-example {
            font-size: 14px;
            color: #6b7280;
            font-weight: 400;
            line-height: 1.5;
            margin: 0;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachments-add-button {
            width: 32px;
            height: 32px;
            min-width: 32px;
            border-radius: 50%;
            border: 1px solid #000000;
            background-color: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            padding: 0;
            flex-shrink: 0;
            transition: all 0.2s;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachments-add-button:hover {
            background-color: #f9fafb;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachments-add-button svg {
            width: 16px;
            height: 16px;
            color: #000000;
            stroke: currentColor;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachments-input {
            position: absolute;
            width: 0.1px;
            height: 0.1px;
            opacity: 0;
            overflow: hidden;
            z-index: -1;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachments-list {
            display: flex;
            flex-direction: column;
            gap: 16px;
            margin-top: 16px;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachment-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 12px 16px;
            border: 1px dashed #d1d5db;
            /* border-radius: 4px; */
            background-color: #ffffff;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachment-item.loading {
            opacity: 0.7;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachment-item.error {
            opacity: 0.7;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachment-details {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachment-name {
            font-size: 14px;
            color: #111827;
            font-weight: 600;
            word-break: break-word;
            line-height: 1.5;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachment-date {
            font-size: 12px;
            color: #6b7280;
            line-height: 1.5;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachment-remove {
            width: 20px;
            height: 20px;
            min-width: 20px;
            background-color: transparent;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            padding: 0;
            transition: opacity 0.2s;
            color: #6b7280;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachment-remove:hover {
            opacity: 0.7;
            color: #ef4444;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-attachment-remove svg {
            width: 16px;
            height: 16px;
            stroke: currentColor;
        }

        @media (max-width: 767px) {
            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-progress {
                gap: 4px;
            }

            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-progress-circle {
                width: 80px;
                height: 80px;
                font-size: 14px;
            }

            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-progress-label {
                font-size: 10px;
            }

            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-progress-connector {
                width: 30px;
            }

            :where(.elementor-widget-wiz_v2_signup_form) .wiz-v2-signup-step-sections {
                display: flex;
                flex-direction: column;
            }
        }

        /* SweetAlert2 custom styles — stay global (toast is body-appended) */
        .swal-custom-top-20 {
            margin-top: 50px !important;
        }

        .swal-custom-success {
            border-left: 4px solid #10b981 !important;
        }

        /* Email validation warning and error message styles — scoped to this widget */
        :where(.elementor-widget-wiz_v2_signup_form) .email-duplicate-error,
        :where(.elementor-widget-wiz_v2_signup_form) .error-message {
            color: #dc2626 !important;
            font-size: 12px !important;
            margin-top: 4px !important;
            line-height: 1.5 !important;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .email-duplicate-warning,
        :where(.elementor-widget-wiz_v2_signup_form) .warning-message {
            color: #f59e0b !important;
            font-size: 12px !important;
            margin-top: 4px !important;
            line-height: 1.5 !important;
        }

        /* Input field warning state */
        :where(.elementor-widget-wiz_v2_signup_form) [data-form-builder-new="true"].email-warning {
            border-color: #f59e0b !important;
        }

        /* Link styling within error/warning messages */
        :where(.elementor-widget-wiz_v2_signup_form) .email-duplicate-error a,
        :where(.elementor-widget-wiz_v2_signup_form) .error-message a {
            color: #000000 !important;
            text-decoration: underline !important;
        }

        :where(.elementor-widget-wiz_v2_signup_form) .email-duplicate-warning a,
        :where(.elementor-widget-wiz_v2_signup_form) .warning-message a {
            color: #f59e0b !important;
            text-decoration: underline !important;
        }
