/* =============================================================================
   Slim Plumbing Employment — Modern Black & White Professional Theme
   ============================================================================= */

/* --------------------------------------------------------------------------
   CSS Custom Property Defaults  (overridden by wp_head inline block)
   -------------------------------------------------------------------------- */
.spe-form-wrap {
    --spe-section-bg:      #0a0a0a;
    --spe-section-text:    #ffffff;
    --spe-subsection-bg:   #1f1f1f;
    --spe-subsection-text: #ffffff;
    --spe-btn-bg:          #0a0a0a;
    --spe-btn-text:        #ffffff;
    --spe-btn-hover:       #333333;
    --spe-add-btn-bg:      #0a0a0a;
    --spe-add-btn-text:    #ffffff;
    --spe-success-bg:      #0a7c3e;
    --spe-error-color:     #c0392b;
    --spe-field-border:    #d1d5db;
    --spe-label-color:     #111827;
    --spe-required-color:  #c0392b;
    --spe-max-width:       880px;
    --spe-font-size:       15px;
}

/* --------------------------------------------------------------------------
   Form Wrapper
   -------------------------------------------------------------------------- */
.spe-form-wrap {
    max-width: var(--spe-max-width);
    width: 100%;          /* always fill available width up to max-width */
    margin: 2.5rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
    font-size: var(--spe-font-size);
    color: #111827;
    line-height: 1.6;
    box-sizing: border-box;
}

/* Form + each step panel stretch to the same full container width */
form.spe-form,
.spe-step {
    width: 100%;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Success & Error Banners
   -------------------------------------------------------------------------- */
.spe-success-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #ecfdf3;
    color: #0f5132;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    border: 1px solid #86efac;
    box-shadow: 0 1px 0 rgba(15, 81, 50, 0.06);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.spe-success-banner::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    border: 2px solid #bbf7d0;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 1px;
}

.spe-error-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid var(--spe-error-color);
    color: #7f1d1d;
    padding: 0.9rem 1.25rem;
    border-radius: 0 6px 6px 0;
    margin-bottom: 1.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Section Headers  (main — solid black)
   -------------------------------------------------------------------------- */
.spe-form-wrap .spe-section-header,
.spe-form-wrap h3.spe-section-header {
    display: block !important;
    box-sizing: border-box;
    width: 100%;
    clear: both;
    float: none;
    position: relative;
    background: var(--spe-section-bg, #0a0a0a) !important;
    color: var(--spe-section-text, #ffffff) !important;
    font-size: 0.6875rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    padding: 0.95rem 1.5rem !important;
    margin: 0 0 1.5rem !important;
    border: none !important;
    border-radius: 2px;
    line-height: 1.4 !important;
}

.spe-section:first-of-type .spe-section-header {
    margin-top: 0 !important;
}

/* --------------------------------------------------------------------------
   Sub-section Headers  (entries like Reference 1, Employer 1)
   -------------------------------------------------------------------------- */
.spe-subsection-header {
    background: var(--spe-subsection-bg);
    color: var(--spe-subsection-text);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.7rem 1.25rem;
    margin: 1.5rem 0 1.25rem;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Education subsection override — sleek underline style instead of dark bar */
.spe-section-body .spe-subsection-header,
.spe-form > .spe-subsection-header {
    background: transparent;
    color: #0a0a0a;
    border-bottom: 2px solid #0a0a0a;
    border-radius: 0;
    padding: 0 0 0.4rem;
    margin: 2rem 0 1.25rem;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}

/* --------------------------------------------------------------------------
   Repeatable Entries  (Reference card / Employer card)
   -------------------------------------------------------------------------- */
.spe-repeatable-entry {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    padding: 1.5rem 1.5rem 1rem;
    margin-bottom: 1.25rem;
    transition: border-left-color 0.2s;
}

.spe-repeatable-entry:hover {
    border-color: #9ca3af;
}

.spe-repeatable-entry .spe-subsection-header {
    background: var(--spe-subsection-bg);
    color: var(--spe-subsection-text);
    border: none;
    border-radius: 4px 4px 0 0;
    padding: 0.65rem 1rem;
    margin: -1.5rem -1.5rem 1.25rem;
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.spe-entry-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}

/* --------------------------------------------------------------------------
   Remove Entry Button
   -------------------------------------------------------------------------- */
.spe-remove-entry {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.35);
    color: rgba(255,255,255,0.85);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 3px;
    cursor: pointer;
    line-height: 1.6;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}
.spe-remove-entry:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.65);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Add-Another Entry Button
   -------------------------------------------------------------------------- */
.spe-add-entry-wrap {
    margin: -0.25rem 0 2rem;
}

.spe-add-entry-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    color: var(--spe-add-btn-bg);
    border: 1.5px solid var(--spe-add-btn-bg);
    padding: 0.55rem 1.25rem;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}
.spe-add-entry-btn:hover {
    background: var(--spe-add-btn-bg);
    color: var(--spe-add-btn-text);
}
.spe-add-entry-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Field Layout
   -------------------------------------------------------------------------- */
.spe-field {
    margin-bottom: 1.1rem;
    display: flex;
    flex-direction: column;
}

.spe-row {
    display: grid;
    gap: 1rem;
}
.spe-row--2 { grid-template-columns: repeat(2, 1fr); }
.spe-row--3 { grid-template-columns: repeat(3, 1fr); }

/* --------------------------------------------------------------------------
   Labels
   -------------------------------------------------------------------------- */
.spe-field > label:not(.spe-radio-label):not(.spe-checkbox-label),
.spe-field .spe-field-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #374151;
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.spe-required {
    color: var(--spe-required-color);
    font-weight: 700;
    margin-left: 1px;
}

/* --------------------------------------------------------------------------
   Inputs & Textareas
   -------------------------------------------------------------------------- */
.spe-form input[type="text"],
.spe-form input[type="email"],
.spe-form input[type="tel"],
.spe-form input[type="date"],
.spe-form input[type="month"],
.spe-form input[type="number"],
.spe-form textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: #fff;
    border: 1.5px solid var(--spe-field-border);
    border-radius: 6px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #111827;
    box-sizing: border-box;
    -webkit-appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    line-height: 1.5;
}

.spe-form input[type="text"]::placeholder,
.spe-form input[type="email"]::placeholder,
.spe-form input[type="tel"]::placeholder,
.spe-form input[type="number"]::placeholder,
.spe-form textarea::placeholder {
    color: #9ca3af;
    font-size: 0.875rem;
}

.spe-form input[type="text"]:focus,
.spe-form input[type="email"]:focus,
.spe-form input[type="tel"]:focus,
.spe-form input[type="date"]:focus,
.spe-form input[type="month"]:focus,
.spe-form input[type="number"]:focus,
.spe-form textarea:focus {
    outline: none;
    border-color: #0a0a0a;
    box-shadow: 0 0 0 3px rgba(10,10,10,0.07);
}

.spe-form input[readonly] {
    background: #f3f4f6;
    color: #6b7280;
    cursor: default;
    border-color: #e5e7eb;
}

/* Date / month / number picker chrome */
.spe-form input[type="date"],
.spe-form input[type="month"] {
    cursor: pointer;
    color: #111827;
}

.spe-form input[type="date"]::-webkit-calendar-picker-indicator,
.spe-form input[type="month"]::-webkit-calendar-picker-indicator {
    opacity: 0.6;
    cursor: pointer;
    filter: invert(0);
    padding: 2px;
    border-radius: 3px;
}

.spe-form input[type="date"]::-webkit-calendar-picker-indicator:hover,
.spe-form input[type="month"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    background: rgba(10,10,10,0.06);
}

/* Year number inputs — hide spinner arrows */
.spe-form input[type="number"] {
    -moz-appearance: textfield;
}
.spe-form input[type="number"]::-webkit-inner-spin-button,
.spe-form input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.spe-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* --------------------------------------------------------------------------
   Radio Buttons
   -------------------------------------------------------------------------- */
.spe-radio-group {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    padding-top: 0.15rem;
}

.spe-radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    color: #374151;
    padding: 0.45rem 1rem;
    border: 1.5px solid #d1d5db;
    margin-right: -1px;
    background: #fff;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    position: relative;
    z-index: 0;
}

.spe-radio-label:first-child {
    border-radius: 5px 0 0 5px;
}

.spe-radio-label:last-child {
    border-radius: 0 5px 5px 0;
    margin-right: 0;
}

.spe-radio-label:hover {
    background: #f3f4f6;
    z-index: 1;
}

.spe-radio-label input[type="radio"] {
    width: 15px;
    height: 15px;
    margin: 0;
    cursor: pointer;
    accent-color: #0a0a0a;
    flex-shrink: 0;
}

.spe-radio-label:has(input:checked) {
    background: #f9fafb;
    border-color: #0a0a0a;
    color: #111827;
    z-index: 2;
}

.spe-radio-label:has(input:checked) span {
    color: #111827;
    font-weight: 500;
}

/* Fallback for browsers that don't support :has() */
.spe-radio-label input[type="radio"]:checked + .spe-radio-btn-text {
    color: inherit;
}

/* --------------------------------------------------------------------------
   Checkbox  (disclaimer)
   -------------------------------------------------------------------------- */
.spe-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    color: #374151;
    line-height: 1.5;
    padding: 0.75rem 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
}

.spe-checkbox-label:has(input:checked) {
    border-color: #0a0a0a;
    background: #f9fafb;
}

.spe-checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    min-width: 17px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #0a0a0a;
}

/* --------------------------------------------------------------------------
   Disclaimer Block
   -------------------------------------------------------------------------- */
.spe-disclaimer {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #0a0a0a;
    padding: 1.1rem 1.25rem;
    margin: 1rem 0 1.25rem;
    font-size: 0.875rem;
    line-height: 1.7;
    color: #4b5563;
    border-radius: 0 6px 6px 0;
    font-style: italic;
}

/* --------------------------------------------------------------------------
   Notes
   -------------------------------------------------------------------------- */
.spe-note {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: -0.5rem 0 1rem;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.spe-note::before {
    content: "ℹ";
    font-style: normal;
    font-size: 0.875rem;
    color: #9ca3af;
}

/* --------------------------------------------------------------------------
   Inline Field Errors
   -------------------------------------------------------------------------- */
.spe-field-error {
    color: var(--spe-error-color);
    font-size: 0.775rem;
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
}

.spe-field-error::before {
    content: "!";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    min-width: 14px;
    border-radius: 50%;
    background: var(--spe-error-color);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    font-style: normal;
}

/* Highlight field with error */
.spe-field:has(.spe-field-error) input,
.spe-field:has(.spe-field-error) textarea {
    border-color: var(--spe-error-color);
}

/* --------------------------------------------------------------------------
   reCAPTCHA
   -------------------------------------------------------------------------- */
.spe-recaptcha-wrap {
    margin: 1.75rem 0 0.5rem;
}

.spe-recaptcha-notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 3px solid #f59e0b;
    padding: 0.8rem 1rem;
    border-radius: 0 6px 6px 0;
    font-size: 0.85rem;
    color: #78350f;
    margin: 1.75rem 0;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Submit Section
   -------------------------------------------------------------------------- */
.spe-submit-wrap {
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.spe-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--spe-btn-bg);
    color: var(--spe-btn-text);
    font-size: 0.8125rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.875rem 3rem;
    border: 2px solid var(--spe-btn-bg);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
    position: relative;
    overflow: hidden;
}

.spe-submit-btn::after {
    content: "→";
    font-size: 1rem;
    transition: transform 0.2s ease;
    display: inline-block;
}

.spe-submit-btn:hover {
    background: var(--spe-btn-hover);
    border-color: var(--spe-btn-hover);
}

.spe-submit-btn:hover::after {
    transform: translateX(4px);
}

.spe-submit-btn:active {
    transform: scale(0.98);
}

.spe-submit-btn:focus {
    outline: 3px solid rgba(10,10,10,0.25);
    outline-offset: 3px;
}

/* =============================================================================
   RESPONSIVE — Tablet & Mobile
   ============================================================================= */

/* --------------------------------------------------------------------------
   Tablet + Mobile  (≤ 768 px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {

    /* Wrapper */
    .spe-form-wrap {
        margin: 1rem 0;
    }

    /* Two- and three-column rows → single column */
    .spe-row--2,
    .spe-row--3 {
        grid-template-columns: 1fr;
    }

    /* ------------------------------------------------------------------
       PROGRESS BAR — vertical layout on mobile
       Dot (left) + Label (right) on the same line, left-aligned
       !important needed: desktop rules sit later in this file
    ------------------------------------------------------------------ */
    .spe-progress-bar {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 0.875rem 0.875rem 0.25rem;
        gap: 0;
        margin-bottom: 0.5rem;
    }

    /* Each step: dot LEFT + label RIGHT on the same horizontal line */
    .spe-progress-step {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.875rem;
        width: 100%;
    }

    .spe-progress-dot {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.75rem;
        flex-shrink: 0;
    }

    .spe-progress-label {
        font-size: 0.72rem;
        text-align: left !important;
        max-width: none !important;
        white-space: normal;
        word-break: normal;
        letter-spacing: 0.04em;
    }

    /* Vertical connector between steps — centered under the dot */
    .spe-progress-line {
        width: 2px !important;
        height: 18px !important;
        flex: 0 0 18px !important;
        margin-top: 0 !important;
        /* (32px dot / 2) − (2px line / 2) = 15px */
        margin-left: 15px;
        align-self: flex-start;
    }

    /* Labels always visible in vertical layout */
    .spe-progress-step .spe-progress-label {
        display: block !important;
    }

    /* Step counter below bar */
    .spe-step-counter {
        font-size: 0.65rem;
        margin-bottom: 1.25rem;
        margin-left: 0;
    }

    /* ------------------------------------------------------------------
       STEP NAVIGATION — meta on top, buttons side-by-side below
       Continue centered when there is no Previous button (first step)
    ------------------------------------------------------------------ */
    .spe-step-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        padding: 1rem;
        gap: 0.6rem;
    }

    /* Meta (title + step count) — spans full width at top */
    .spe-step-nav-meta {
        grid-column: 1 / -1;
        grid-row: 1;
        text-align: center;
        padding-bottom: 0.6rem;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 0.15rem;
    }

    /* Spacer (placeholder when no Prev) — hidden */
    .spe-nav-spacer { display: none; }

    /* Prev button — left cell of second row */
    .spe-prev-btn {
        grid-column: 1;
        grid-row: 2;
        min-width: unset;
        width: 100%;
        font-size: 0.8rem;
        padding: 0.7rem 0.75rem;
    }

    /* Next button — right cell of second row */
    .spe-next-btn {
        grid-column: 2;
        grid-row: 2;
        min-width: unset;
        width: 100%;
        font-size: 0.8rem;
        padding: 0.7rem 0.75rem;
    }

    /* Submit button (last step) — always full width */
    .spe-step-nav .spe-submit-btn {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        font-size: 0.8rem;
        padding: 0.7rem 0.75rem;
    }

    /* First step: no Prev button → Continue spans full width + centered */
    .spe-step-nav:not(:has(.spe-prev-btn)) .spe-next-btn {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
    }

    /* ------------------------------------------------------------------
       Section / subsection headers
    ------------------------------------------------------------------ */
    .spe-section-header {
        font-size: 0.6rem;
        padding: 0.75rem 1rem;
        letter-spacing: 0.12em;
    }

    .spe-subsection-header {
        font-size: 0.6rem;
        padding: 0.5rem 0.875rem;
    }

    /* ------------------------------------------------------------------
       Inputs — 16 px minimum prevents iOS auto-zoom on focus
    ------------------------------------------------------------------ */
    .spe-form input[type="text"],
    .spe-form input[type="email"],
    .spe-form input[type="tel"],
    .spe-form input[type="date"],
    .spe-form input[type="month"],
    .spe-form input[type="number"],
    .spe-form textarea {
        font-size: 16px;
        padding: 0.6rem 0.75rem;
    }

    /* Field labels */
    .spe-field > label:not(.spe-radio-label):not(.spe-checkbox-label) {
        font-size: 0.68rem;
    }

    /* Radio segmented group — wrap naturally */
    .spe-radio-group { flex-wrap: wrap; }

    .spe-radio-label {
        flex: 1 1 auto;
        min-width: 72px;
        justify-content: center;
        font-size: 0.8rem;
        padding: 0.45rem 0.6rem;
    }

    /* Repeatable entry cards */
    .spe-repeatable-entry {
        padding: 1.25rem 1rem 0.875rem;
    }

    .spe-repeatable-entry .spe-subsection-header {
        margin: -1.25rem -1rem 1rem;
    }

    /* Add-another buttons */
    .spe-add-entry-btn,
    .spe-add-entry-wrap { width: 100%; }

    .spe-add-entry-btn {
        justify-content: center;
        text-align: center;
    }

    /* Disclaimer */
    .spe-disclaimer { font-size: 0.875rem; padding: 1rem; }
    .spe-checkbox-label { font-size: 0.9rem; padding: 0.875rem; }

    /* Banners */
    .spe-error-banner,
    .spe-success-banner {
        font-size: 0.875rem;
        padding: 0.875rem 1rem;
        gap: 0.5rem;
    }

    /* Note/hint */
    .spe-note { font-size: 0.8rem; padding: 0.45rem 0.6rem; }

    /* Standalone submit (outside nav) */
    .spe-submit-btn { width: 100%; justify-content: center; }
}

/* --------------------------------------------------------------------------
   Small phones  (≤ 480 px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {

    /* Tighten vertical progress bar on very small screens */
    .spe-progress-bar {
        padding: 0.75rem 0.75rem 0.25rem;
    }

    .spe-progress-dot {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.66rem;
    }

    /* Connector line stays centred under the smaller dot (26/2 - 1 = 12px) */
    .spe-progress-line {
        height: 14px !important;
        flex: 0 0 14px !important;
        margin-left: 12px;
    }

    .spe-progress-label {
        font-size: 0.68rem;
    }

    .spe-step-counter { margin-bottom: 1rem; }

    /* Tighter radio labels */
    .spe-radio-label { min-width: 60px; }

    /* Slightly softer card corners */
    .spe-app-card,
    .spe-repeatable-entry { border-radius: 6px; }

    .spe-field { gap: 4px; }
}

@media (max-width: 480px) {
    .spe-add-entry-btn {
        width: 100%;
        justify-content: center;
    }
}

/* =============================================================================
   MULTI-STEP FORM — Progress Bar & Navigation
   ============================================================================= */

/* --------------------------------------------------------------------------
   Progress Bar
   -------------------------------------------------------------------------- */
.spe-progress-bar {
    display: flex;
    align-items: flex-start;
    margin: 0 0 0.75rem;
    padding: 1.5rem 0 0.5rem;
    position: relative;
}

.spe-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
    cursor: default;
}

.spe-progress-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #fff;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.spe-progress-label {
    font-size: 0.58rem;
    font-weight: 500;
    color: #9ca3af;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    max-width: 108px;
    line-height: 1.25;
    transition: color 0.2s ease;
    /* Allow up to 3 lines for 5-step PDF section titles */
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Connecting line between steps */
.spe-progress-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin-top: 19px; /* vertically align with dot centre */
    transition: background 0.4s ease;
    position: relative;
}

.spe-progress-line.is-complete {
    background: #0a0a0a;
}

/* Active step */
.spe-progress-step.is-active .spe-progress-dot {
    background: #0a0a0a;
    border-color: #0a0a0a;
    color: #fff;
    box-shadow: 0 0 0 5px rgba(10,10,10,0.1);
}

.spe-progress-step.is-active .spe-progress-label {
    color: #0a0a0a;
    font-weight: 700;
}

/* Complete step */
.spe-progress-step.is-complete .spe-progress-dot {
    background: #0a0a0a;
    border-color: #0a0a0a;
    color: #fff;
}

.spe-progress-step.is-complete .spe-dot-num {
    display: none;
}

.spe-progress-step.is-complete .spe-progress-dot::after {
    content: '✓';
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.spe-progress-step.is-complete .spe-progress-label {
    color: #6b7280;
}

/* --------------------------------------------------------------------------
   Step Counter
   -------------------------------------------------------------------------- */
.spe-step-counter {
    text-align: center;
    font-size: 0.7rem;
    color: #9ca3af;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    margin: 0 0 1.75rem;
    padding-top: 0.25rem;
    border-top: 1px solid #f3f4f6;
}

/* --------------------------------------------------------------------------
   Step Panel — visibility managed by JS
   -------------------------------------------------------------------------- */

/* When JS is ready, hide all steps and show only .is-active */
.spe-steps-js-ready .spe-step {
    display: none;
}

.spe-steps-js-ready .spe-step.is-active {
    display: block;
    animation: speStepIn 0.3s ease;
}

@keyframes speStepIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Step Navigation Bar
   -------------------------------------------------------------------------- */
.spe-step-nav {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.spe-step-nav-meta {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.spe-step-nav-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.spe-step-nav-count {
    font-size: 0.7rem;
    color: #9ca3af;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.spe-nav-spacer {
    width: 120px;
}

/* Previous Button */
.spe-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.65rem 1.4rem;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    min-width: 120px;
    justify-content: center;
}

.spe-prev-btn {
    background: #fff;
    color: #374151;
    border: 1.5px solid #d1d5db;
}

.spe-prev-btn:hover {
    border-color: #0a0a0a;
    color: #0a0a0a;
    background: #f9fafb;
}

.spe-next-btn {
    background: #0a0a0a;
    color: #fff;
    border: 2px solid #0a0a0a;
}

.spe-next-btn:hover {
    background: #333;
    border-color: #333;
}

.spe-next-btn:active,
.spe-prev-btn:active {
    transform: scale(0.97);
}

/* Submit button in step nav */
.spe-step-nav .spe-submit-btn {
    min-width: 120px;
    padding: 0.65rem 1.4rem;
    font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   Submit wrap — single page form
   -------------------------------------------------------------------------- */
.spe-form .spe-submit-wrap {
    margin-top: 2rem;
    padding: 1.5rem 0;
    text-align: center;
}

.spe-submit-wrap .spe-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--spe-btn-bg);
    color: var(--spe-btn-text);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    border: 2px solid var(--spe-btn-bg);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.spe-submit-wrap .spe-submit-btn:hover {
    background: var(--spe-btn-hover);
    border-color: var(--spe-btn-hover);
}

/* --------------------------------------------------------------------------
   Form Header & Intro
   -------------------------------------------------------------------------- */
.spe-form-header {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 1.5rem;
}

.spe-form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.spe-form-intro {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Form Sections
   -------------------------------------------------------------------------- */
.spe-section {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: none;
    padding: 0;
    margin: 0 0 2.5rem;
    clear: both;
}

.spe-section .spe-field {
    display: block;
    width: 100%;
    box-sizing: border-box;
    clear: both;
}

.spe-section-intro {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 1.5rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid var(--spe-section-bg);
}

/* --------------------------------------------------------------------------
   Checkbox Groups (multi-select)
   -------------------------------------------------------------------------- */
.spe-field--checkbox-group .spe-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.spe-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9rem;
    color: #374151;
}

.spe-checkbox-label:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.spe-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: #0a0a0a;
    flex-shrink: 0;
}

.spe-checkbox-label input[type="checkbox"]:checked + span {
    color: #111827;
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Radio Groups - Improved layout
   -------------------------------------------------------------------------- */
.spe-field--radio .spe-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.spe-field--radio .spe-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9rem;
    color: #374151;
}

.spe-field--radio .spe-radio-label:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.spe-field--radio .spe-radio-label:has(input:checked) {
    background: #f9fafb;
    border-color: #0a0a0a;
    color: #111827;
}

.spe-field--radio .spe-radio-label:has(input:checked) span {
    color: #111827;
    font-weight: 500;
}

.spe-field--radio .spe-radio-label input[type="radio"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: #0a0a0a;
    flex-shrink: 0;
}

.spe-field--radio .spe-radio-label input[type="radio"]:checked + span {
    color: #111827;
    font-weight: 500;
}

/* Compact radios for short options (Yes/No, Call/Text/Email) */
.spe-field--radio[data-radio-name="preferred_contact"] .spe-radio-group,
.spe-field--radio[data-radio-name="has_licenses"] .spe-radio-group,
.spe-field--radio[data-radio-name="work_type"] .spe-radio-group,
.spe-field--radio[data-radio-name="flexible_schedule"] .spe-radio-group {
    flex-direction: row;
    flex-wrap: wrap;
}

.spe-field--radio[data-radio-name="preferred_contact"] .spe-radio-label,
.spe-field--radio[data-radio-name="has_licenses"] .spe-radio-label,
.spe-field--radio[data-radio-name="work_type"] .spe-radio-label {
    flex: 0 0 auto;
    padding: 0.6rem 1.25rem;
}

/* --------------------------------------------------------------------------
   File Upload Field
   -------------------------------------------------------------------------- */
.spe-field--file input[type="file"] {
    width: 100%;
    padding: 1rem;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.spe-field--file input[type="file"]:hover {
    border-color: #9ca3af;
    background: #f3f4f6;
}

.spe-field--file input[type="file"]:focus {
    outline: none;
    border-color: #0a0a0a;
    background: #fff;
}

.spe-file-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* --------------------------------------------------------------------------
   Conditional Fields (hidden by default, shown via JS)
   -------------------------------------------------------------------------- */
.spe-field[data-conditional-field] {
    transition: opacity 0.2s ease, max-height 0.2s ease;
}

/* --------------------------------------------------------------------------
   reCAPTCHA wrap
   -------------------------------------------------------------------------- */
.spe-recaptcha-wrap {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

/* (Mobile responsive rules moved to the consolidated @media block above) */

/* --------------------------------------------------------------------------
   Mobile: Checkbox/Radio groups
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
    .spe-field--checkbox-group .spe-checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .spe-field--radio .spe-radio-group {
        flex-direction: column !important;
    }
    
    .spe-form-title {
        font-size: 1.4rem;
    }
    
    .spe-submit-wrap .spe-submit-btn {
        width: 100%;
        padding: 1rem 1.5rem;
    }
}
/* =============================================================================
   MULTI-STEP FORM — Progress Bar & Navigation
   ============================================================================= */

/* --------------------------------------------------------------------------
   Progress Bar
   -------------------------------------------------------------------------- */
.spe-progress-bar {
    display: flex;
    align-items: flex-start;
    margin: 0 0 0.75rem;
    padding: 1.5rem 0 0.5rem;
    position: relative;
}

.spe-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
    cursor: default;
}

.spe-progress-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #fff;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.spe-progress-label {
    font-size: 0.58rem;
    font-weight: 500;
    color: #9ca3af;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    max-width: 108px;
    line-height: 1.25;
    transition: color 0.2s ease;
    /* Allow up to 3 lines for 5-step PDF section titles */
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Connecting line between steps */
.spe-progress-line {
    flex: 1;
    height: 2px;
    background: #e5e7eb;
    margin-top: 19px; /* vertically align with dot centre */
    transition: background 0.4s ease;
    position: relative;
}

.spe-progress-line.is-complete {
    background: #0a0a0a;
}

/* Active step */
.spe-progress-step.is-active .spe-progress-dot {
    background: #0a0a0a;
    border-color: #0a0a0a;
    color: #fff;
    box-shadow: 0 0 0 5px rgba(10,10,10,0.1);
}

.spe-progress-step.is-active .spe-progress-label {
    color: #0a0a0a;
    font-weight: 700;
}

/* Complete step */
.spe-progress-step.is-complete .spe-progress-dot {
    background: #0a0a0a;
    border-color: #0a0a0a;
    color: #fff;
}

.spe-progress-step.is-complete .spe-dot-num {
    display: none;
}

.spe-progress-step.is-complete .spe-progress-dot::after {
    content: '✓';
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.spe-progress-step.is-complete .spe-progress-label {
    color: #6b7280;
}

/* --------------------------------------------------------------------------
   Step Counter
   -------------------------------------------------------------------------- */
.spe-step-counter {
    text-align: center;
    font-size: 0.7rem;
    color: #9ca3af;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
    margin: 0 0 1.75rem;
    padding-top: 0.25rem;
    border-top: 1px solid #f3f4f6;
}

/* --------------------------------------------------------------------------
   Step Panel — visibility managed by JS
   -------------------------------------------------------------------------- */

/* When JS is ready, hide all steps and show only .is-active */
.spe-steps-js-ready .spe-step {
    display: none;
}

.spe-steps-js-ready .spe-step.is-active {
    display: block;
    animation: spcStepIn 0.3s ease;
}

@keyframes spcStepIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Step Navigation Bar
   -------------------------------------------------------------------------- */
.spe-step-nav {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.spe-step-nav-meta {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.spe-step-nav-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.spe-step-nav-count {
    font-size: 0.7rem;
    color: #9ca3af;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.spe-nav-spacer {
    width: 120px;
}

/* Previous Button */
.spe-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.65rem 1.4rem;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    min-width: 120px;
    justify-content: center;
}

.spe-prev-btn {
    background: #fff;
    color: #374151;
    border: 1.5px solid #d1d5db;
}

.spe-prev-btn:hover {
    border-color: #0a0a0a;
    color: #0a0a0a;
    background: #f9fafb;
}

.spe-next-btn {
    background: #0a0a0a;
    color: #fff;
    border: 2px solid #0a0a0a;
}

.spe-next-btn:hover {
    background: #333;
    border-color: #333;
}

.spe-next-btn:active,
.spe-prev-btn:active {
    transform: scale(0.97);
}

/* Submit button in step nav */
.spe-step-nav .spe-submit-btn {
    min-width: 120px;
    padding: 0.65rem 1.4rem;
    font-size: 0.78rem;
}

/* --------------------------------------------------------------------------
   Submit wrap — hide the old submit-wrap style since we use step nav
   -------------------------------------------------------------------------- */
.spe-form .spe-submit-wrap {
    display: none; /* handled via step nav on last step */
}

/* (Mobile responsive rules moved to the consolidated @media block above) */

.spe-form.spe-steps-js-ready .spe-submit-wrap { display: none; }
.spe-step-nav .spe-submit-btn { display: inline-flex; }
