/* Fitting Widget — scoped with ftw- prefix */
/* Supports light (default) and dark themes via data-ftw-theme attribute */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;700&family=Barlow+Condensed:wght@600;700&display=swap');

/* Modal — structure is applied inline by JS; these are content defaults */
.ftw-modal {
    font-family: 'Barlow', sans-serif;
    color: #f8f8f8;
}

.ftw-modal[data-ftw-theme="light"] {
    color: #0b0b0b;
}

/* Font smoothing across every widget element (scoped to the widget root so it
   never alters the host page's text rendering). */
.ftw-modal,
.ftw-modal * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: never;
}

.ftw-modal-content {
    padding: 12px 24px 24px;
}

/* Breadcrumb */
.ftw-breadcrumb {
    display: flex;
    gap: 2px;
    align-items: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #a1a1a1;
    margin-bottom: 12px;
    line-height: 1.25;
}

[data-ftw-theme="light"] .ftw-breadcrumb {
    color: #707070;
}

.ftw-breadcrumb span {
    white-space: nowrap;
}

.ftw-breadcrumb .ftw-breadcrumb-sep {
    margin: 0 2px;
}

/* Header */
.ftw-header {
    margin-bottom: 12px;
}

.ftw-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #f8f8f8;
    margin: 0;
    line-height: 1.2;
}

[data-ftw-theme="light"] .ftw-title {
    color: #0b0b0b;
}

/* Form fields */
.ftw-field {
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.ftw-field-label {
    display: block;
    font-family: 'Barlow', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #f8f8f8;
    margin-bottom: 8px;
    line-height: 1.5;
}

[data-ftw-theme="light"] .ftw-field-label {
    color: #0b0b0b;
}

.ftw-help-text {
    font-size: 13px;
    color: #a1a1a1;
    margin-top: 8px;
    line-height: 1.5;
}

[data-ftw-theme="light"] .ftw-help-text {
    color: #707070;
}

/* Select dropdown */
.ftw-select {
    width: 100%;
    padding: 10px 14px;
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #383838;
    border-radius: 4px;
    background: #0b0b0b;
    color: #f8f8f8;
    appearance: auto;
    cursor: pointer;
    transition: border-color 0.15s;
}

[data-ftw-theme="light"] .ftw-select {
    border-color: #bababa;
    background: #f8f8f8;
    color: #0b0b0b;
}

.ftw-select:focus {
    outline: none;
    border-color: #ff6e01;
    box-shadow: 0 0 0 2px rgba(255, 110, 1, 0.15);
}

/* Range slider */
.ftw-range {
    width: 100%;
    height: 16px;
    appearance: none;
    background: #383838;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
    padding: 0 4px;
}

[data-ftw-theme="light"] .ftw-range {
    background: #d4d4d4;
}

.ftw-range::-webkit-slider-thumb {
    appearance: none;
    width: 40px;
    height: 24px;
    background: #ff6e01;
    border-radius: 999px;
    cursor: pointer;
    border: 1px solid rgba(248, 248, 248, 0.1);
    box-shadow: none;
}

[data-ftw-theme="light"] .ftw-range::-webkit-slider-thumb {
    border-color: rgba(11, 11, 11, 0.1);
    box-shadow: 0 4px 4px rgba(11, 11, 11, 0.1);
}

.ftw-range::-moz-range-thumb {
    width: 40px;
    height: 24px;
    background: #ff6e01;
    border-radius: 999px;
    cursor: pointer;
    border: 1px solid rgba(248, 248, 248, 0.1);
    box-shadow: none;
}

[data-ftw-theme="light"] .ftw-range::-moz-range-thumb {
    border-color: rgba(11, 11, 11, 0.1);
    box-shadow: 0 4px 4px rgba(11, 11, 11, 0.1);
}

.ftw-range-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 4px;
    margin-bottom: 8px;
}

.ftw-range-labels span {
    font-family: 'Barlow', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #a1a1a1;
    text-align: center;
    letter-spacing: 0.02em;
    line-height: 1.5;
    min-width: 32px;
    padding: 0 4px;
    border-radius: 4px;
}

[data-ftw-theme="light"] .ftw-range-labels span {
    color: #707070;
}

.ftw-range-unit {
    font-size: 12px;
    color: #a1a1a1;
    margin-top: 4px;
    display: block;
}

[data-ftw-theme="light"] .ftw-range-unit {
    color: #707070;
}

.ftw-range-value {
    text-align: center;
    font-size: 64px;
    letter-spacing: -0.64px;
    font-weight: 600;
    color: #f8f8f8;
    margin-top: 4px;
}

[data-ftw-theme="light"] .ftw-range-value {
    color: #0b0b0b;
}

/* Radio group */
.ftw-radio-group {
    display: flex;
    gap: 8px;
}

.ftw-radio-card {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    box-sizing: border-box;
    border: 1px solid #383838;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #545454;
    transition: border 0.15s, background 0.15s, color 0.15s;
    text-align: center;
}

.ftw-radio-card:hover {
    border: 2px solid #707070;
}

.ftw-radio-card:has(input:checked) {
    border: 2px solid #ff6e01;
    background: transparent;
    color: #f8f8f8;
}

[data-ftw-theme="light"] .ftw-radio-card {
    border-color: #d4d4d4;
    color: #545454;
}

[data-ftw-theme="light"] .ftw-radio-card:hover {
    border: 2px solid #d4d4d4;
}

[data-ftw-theme="light"] .ftw-radio-card:has(input:checked) {
    border: 2px solid #ff6e01;
    background: #f0f0f0;
    color: #0b0b0b;
}

/* Icon variant — taller card with a leading SVG glyph (e.g. gender step) */
.ftw-radio-card--icon {
    min-height: 80px;
    gap: 8px;
}

.ftw-radio-card-icon {
    width: 24px;
    height: 24px;
    color: #545454;
    transition: color 0.15s;
    flex-shrink: 0;
}

/* Mirror variant — used to render a left-hand icon from the same right-hand
   SVG path, so the two cards in the handedness step look like mirror images. */
.ftw-radio-card-icon--flip {
    transform: scaleX(-1);
}

.ftw-radio-card:has(input:checked) .ftw-radio-card-icon {
    color: #ff6e01;
}

.ftw-radio-card input[type="radio"] {
    display: none;
}

/* Checkbox group — landscape icon cards (3 cols mobile, 4 cols desktop) */
.ftw-checkbox-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .ftw-checkbox-group {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ftw-checkbox-card {
    display: block;
    cursor: pointer;
    font-family: 'Barlow', sans-serif;
    transition: opacity 0.15s;
}

.ftw-checkbox-card-tile {
    aspect-ratio: 120 / 68;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #383838;
    border-radius: 4px;
    background: rgba(56, 56, 56, 0.3);
    transition: border-color 0.15s;
}

[data-ftw-theme="light"] .ftw-checkbox-card-tile {
    border-color: #bababa;
    background: rgba(186, 186, 186, 0.15);
}

.ftw-checkbox-card-tile img {
    max-width: 64%;
    max-height: 64%;
    object-fit: contain;
    pointer-events: none;
}

/* Characteristic icons ship in a dark and a light variant; show the one that
   matches the active theme (dark is the default). */
.ftw-checkbox-card-tile .ftw-icon--light {
    display: none;
}

[data-ftw-theme="light"] .ftw-checkbox-card-tile .ftw-icon--dark {
    display: none;
}

[data-ftw-theme="light"] .ftw-checkbox-card-tile .ftw-icon--light {
    display: block;
}

.ftw-checkbox-card-label {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #a1a1a1;
    text-align: center;
    transition: color 0.15s;
}

[data-ftw-theme="light"] .ftw-checkbox-card-label {
    color: #707070;
}

.ftw-checkbox-card:has(input:checked) .ftw-checkbox-card-tile {
    border-color: #ff6e01;
}

.ftw-checkbox-card:has(input:checked) .ftw-checkbox-card-label {
    color: #f8f8f8;
}

[data-ftw-theme="light"] .ftw-checkbox-card:has(input:checked) .ftw-checkbox-card-label {
    color: #0b0b0b;
}

.ftw-checkbox-card.ftw-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.ftw-checkbox-card input[type="checkbox"] {
    display: none;
}

/* Page title (h1 below breadcrumb) */
.ftw-page-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.005em;
    color: #f8f8f8;
    margin: 0 0 24px;
}

[data-ftw-theme="light"] .ftw-page-title {
    color: #0b0b0b;
}

/* Stepper input (numeric +/−) */
.ftw-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #383838;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
}

[data-ftw-theme="light"] .ftw-stepper {
    border-color: #bababa;
}

.ftw-stepper-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: #f8f8f8;
    font-family: 'Barlow', sans-serif;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}

[data-ftw-theme="light"] .ftw-stepper-btn {
    color: #0b0b0b;
}

.ftw-stepper-btn:hover {
    background: rgba(56, 56, 56, 0.5);
}

[data-ftw-theme="light"] .ftw-stepper-btn:hover {
    background: rgba(11, 11, 11, 0.04);
}

.ftw-stepper-value {
    height: 44px;
    min-width: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 8px;
    border-left: 1px solid #383838;
    border-right: 1px solid #383838;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #f8f8f8;
    font-variant-numeric: tabular-nums;
}

[data-ftw-theme="light"] .ftw-stepper-value {
    border-color: #bababa;
    color: #0b0b0b;
}

.ftw-stepper-value input {
    width: 56px;
    background: transparent;
    border: 0;
    color: inherit;
    font: inherit;
    text-align: center;
    outline: none;
    padding: 0;
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Hide native number-spinner arrows so the +/− buttons stay the only steppers. */
.ftw-stepper-value input::-webkit-outer-spin-button,
.ftw-stepper-value input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ftw-stepper-unit {
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #a1a1a1;
}

[data-ftw-theme="light"] .ftw-stepper-unit {
    color: #707070;
}

/* Inline fields (e.g. ft + in stepper pair) */
.ftw-inline-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Score indicator (5-dot bar) */
.ftw-score {
    display: inline-flex;
    gap: 4px;
}

.ftw-score-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #383838;
}

[data-ftw-theme="light"] .ftw-score-dot {
    background: #d4d4d4;
}

.ftw-score-dot--filled {
    background: #ff6e01;
}

[data-ftw-theme="light"] .ftw-score-dot--filled {
    background: #ff6e01;
}

/* Submit button */
.ftw-submit {
    display: block;
    width: 100%;
    padding: 14px 17px;
    margin-top: 16px;
    background: #ff6e01;
    color: #0b0b0b;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    border: 1px solid rgba(248, 248, 248, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
    box-shadow: 0 4px 4px rgba(11, 11, 11, 0.1);
    line-height: 16px;
}

[data-ftw-theme="light"] .ftw-submit {
    border-color: rgba(11, 11, 11, 0.1);
}

.ftw-submit:hover {
    background: #e56300;
}

.ftw-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results */
.ftw-results {
    text-align: left;
}

.ftw-result-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Carousel — mobile: swipeable; desktop: overlapping cards */
.ftw-carousel {
    margin-bottom: 24px;
}

.ftw-carousel-viewport {
    overflow: hidden;
}

.ftw-carousel-track {
    display: flex;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ftw-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
}

.ftw-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.ftw-carousel-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #383838;
    cursor: pointer;
    transition: background 0.15s;
}

[data-ftw-theme="light"] .ftw-carousel-dot {
    background: #d4d4d4;
}

.ftw-carousel-dot.is-active {
    background: #ff6e01;
}

@media (min-width: 768px) {
    .ftw-carousel-viewport {
        overflow: visible;
    }

    .ftw-carousel-track {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
        transform: none !important;
    }

    .ftw-carousel-slide {
        grid-row: 1;
        grid-column: 1;
        width: 64%;
        transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
    }

    .ftw-carousel-slide--first {
        justify-self: start;
        transform-origin: top left;
    }

    .ftw-carousel-slide--second {
        justify-self: end;
        transform-origin: top right;
    }

    .ftw-carousel-slide.is-active {
        z-index: 2;
        transform: scale(1) translateY(0);
        opacity: 1;
    }

    .ftw-carousel-slide:not(.is-active) {
        z-index: 1;
        transform: scale(0.9) translateY(20px);
        opacity: 0.2;
        cursor: pointer;
    }
}

.ftw-result-intro {
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #a1a1a1;
    margin-bottom: 12px;
}

[data-ftw-theme="light"] .ftw-result-intro {
    color: #707070;
}

.ftw-result-card {
    border-radius: 8px;
    overflow: hidden;
    background: #1c1c1c;
    border: 1px solid transparent;
}

[data-ftw-theme="light"] .ftw-result-card {
    background: #f8f8f8;
    border-color: #e5e5e5;
}

.ftw-result-card--primary {
    border-color: #ff6e01;
}

.ftw-result-header {
    position: relative;
    padding: 16px 16px 16px;
}

.ftw-result-header:has(.ftw-result-image) {
    min-height: 160px;
}

.ftw-result-badge {
    display: inline-block;
    padding: 2px 6px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #ff6e01;
    color: #0b0b0b;
}

.ftw-result-image {
    position: absolute;
    bottom: 0;
    right: 16px;
    width: 144px;
    height: 144px;
    object-fit: contain;
    pointer-events: none;
}

.ftw-result-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    color: #f8f8f8;
    margin: 8px 0 4px;
    line-height: 1;
    letter-spacing: 0.01em;
}

.ftw-result-header:has(.ftw-result-image) .ftw-result-name {
    margin-top: 64px;
}

[data-ftw-theme="light"] .ftw-result-name {
    color: #0b0b0b;
}

.ftw-result-description {
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    color: #a1a1a1;
    margin: 0;
    padding-right: 96px;
    line-height: 1.4;
}

[data-ftw-theme="light"] .ftw-result-description {
    color: #707070;
}

.ftw-specs {
    margin: 0 16px;
    padding: 0;
    border-top: 1px solid #383838;
}

[data-ftw-theme="light"] .ftw-specs {
    border-top-color: #e5e5e5;
}

.ftw-spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #383838;
}

[data-ftw-theme="light"] .ftw-spec-row {
    border-bottom-color: #e5e5e5;
}

.ftw-spec-row:last-child {
    border-bottom: none;
}

.ftw-result-card .ftw-select-btn {
    margin: 12px 16px 16px;
    width: calc(100% - 32px);
}

.ftw-spec-row dt {
    font-family: 'Barlow', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #a1a1a1;
}

[data-ftw-theme="light"] .ftw-spec-row dt {
    color: #707070;
}

.ftw-spec-row dd {
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #f8f8f8;
    margin: 0;
}

[data-ftw-theme="light"] .ftw-spec-row dd {
    color: #0b0b0b;
}

/* Select button */
.ftw-select-btn {
    display: block;
    width: 100%;
    padding: 14px 17px;
    background: #ff6e01;
    color: #0b0b0b;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    border: 1px solid rgba(248, 248, 248, 0.1);
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s;
    box-shadow: 0 4px 4px rgba(11, 11, 11, 0.1);
}

[data-ftw-theme="light"] .ftw-select-btn {
    border-color: rgba(11, 11, 11, 0.1);
}

.ftw-select-btn:hover {
    background: #e56300;
}

.ftw-select-btn--secondary {
    background: #383838;
    color: #f8f8f8;
    border-color: #383838;
    box-shadow: none;
}

[data-ftw-theme="light"] .ftw-select-btn--secondary {
    background: rgba(11, 11, 11, 0);
    color: #0b0b0b;
    border-color: #bababa;
}

.ftw-select-btn--secondary:hover {
    background: #454545;
}

[data-ftw-theme="light"] .ftw-select-btn--secondary:hover {
    background: rgba(11, 11, 11, 0.04);
}

/* Empty state */
.ftw-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #a1a1a1;
}

[data-ftw-theme="light"] .ftw-empty {
    color: #707070;
}

/* Loading spinner */
.ftw-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #a1a1a1;
}

[data-ftw-theme="light"] .ftw-loading {
    color: #707070;
}

.ftw-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #383838;
    border-top-color: #ff6e01;
    border-radius: 50%;
    animation: ftw-spin 0.6s linear infinite;
    margin-bottom: 1rem;
}

[data-ftw-theme="light"] .ftw-spinner {
    border-color: #d4d4d4;
    border-top-color: #ff6e01;
}

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

/* Error state */
.ftw-error {
    text-align: center;
    padding: 2rem 1rem;
    color: #ff6e01;
}

.ftw-error-close {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: #383838;
    color: #f8f8f8;
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

[data-ftw-theme="light"] .ftw-error-close {
    background: rgba(11, 11, 11, 0);
    color: #0b0b0b;
    border: 1px solid #bababa;
}

.ftw-error-close:hover {
    background: #454545;
}

[data-ftw-theme="light"] .ftw-error-close:hover {
    background: rgba(11, 11, 11, 0.04);
}

/* ==========================================
   Full fitting step layout (inline + modal)
   Mirrors the Livewire layouts/fitting card.
   ========================================== */

/* When the host contains a step form, drop modal-content padding so the form
   can fill the sheet from edge to edge. Covers built-in modal, TakomoModal,
   and inline container hosts. */
.ftw-modal-content:has(.ftw-step-form),
.tkm-content:has(.ftw-step-form) {
    padding: 0;
    height: 100%;
}

.ftw-step-form {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

/* Sticky header */
.ftw-step-header {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 24px 24px 16px;
    background: #1c1c1c;
}

[data-ftw-theme="light"] .ftw-step-header {
    background: #f8f8f8;
}

.ftw-step-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    margin-bottom: 12px;
}

.ftw-step-breadcrumb-brand {
    color: #ff6e01;
}

.ftw-step-breadcrumb-sep,
.ftw-step-breadcrumb-step {
    color: #a1a1a1;
}

[data-ftw-theme="light"] .ftw-step-breadcrumb-sep,
[data-ftw-theme="light"] .ftw-step-breadcrumb-step {
    color: #707070;
}

.ftw-step-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ftw-step-progress-bar {
    flex: 1;
    height: 4px;
    background: #383838;
    border-radius: 2px;
    overflow: hidden;
}

[data-ftw-theme="light"] .ftw-step-progress-bar {
    background: #e5e5e5;
}

.ftw-step-progress-fill {
    height: 100%;
    background: #ff6e01;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.ftw-step-progress-check {
    width: 28px;
    height: 28px;
    border: 1px solid #383838;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

[data-ftw-theme="light"] .ftw-step-progress-check {
    border-color: #e5e5e5;
}

.ftw-step-progress-check svg {
    width: 14px;
    height: 14px;
    stroke: #a1a1a1;
    stroke-width: 2.5;
    fill: none;
}

.ftw-step-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.1;
    color: #f8f8f8;
    margin: 0;
}

.ftw-step-title:focus {
    outline: none;
}

[data-ftw-theme="light"] .ftw-step-title {
    color: #0b0b0b;
}

/* Scrollable body */
.ftw-step-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 24px 24px;
    min-height: 0;
}

/* Sticky footer */
.ftw-step-footer {
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
    background: #1c1c1c;
}

[data-ftw-theme="light"] .ftw-step-footer {
    background: #f8f8f8;
}

.ftw-step-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.15s;
}

.ftw-step-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.ftw-step-btn:disabled {
    cursor: default;
}

/* Inline spinner shown inside a step button while its action is pending.
   Uses currentColor so it matches each button's text colour in both themes. */
.ftw-btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ftw-spin 0.6s linear infinite;
}

.ftw-step-btn--prev {
    background: #383838;
    color: #f8f8f8;
}

.ftw-step-btn--prev:hover:not(:disabled) {
    background: #545454;
}

.ftw-step-btn--prev:disabled {
    background: rgba(56, 56, 56, 0.5);
    color: #707070;
    cursor: not-allowed;
}

[data-ftw-theme="light"] .ftw-step-btn--prev {
    background: #e5e5e5;
    color: #0b0b0b;
}

[data-ftw-theme="light"] .ftw-step-btn--prev:hover:not(:disabled) {
    background: #d4d4d4;
}

[data-ftw-theme="light"] .ftw-step-btn--prev:disabled {
    background: rgba(229, 229, 229, 0.5);
    color: #a1a1a1;
}

.ftw-step-btn--next {
    background: #ff6e01;
    color: #0b0b0b;
}

.ftw-step-btn--next:hover {
    background: #e56300;
}

/* Reset button (results page) */
.ftw-step-btn--reset {
    background: transparent;
    color: #f8f8f8;
    border: 1px solid #383838;
}

.ftw-step-btn--reset:hover {
    background: rgba(56, 56, 56, 0.5);
    border-color: #545454;
}

[data-ftw-theme="light"] .ftw-step-btn--reset {
    color: #0b0b0b;
    border-color: #bababa;
}

[data-ftw-theme="light"] .ftw-step-btn--reset:hover {
    background: rgba(11, 11, 11, 0.04);
    border-color: #707070;
}

/* Completed-state progress (filled bar + filled check circle) */
.ftw-step-progress-check--complete {
    background: #ff6e01;
    border-color: #ff6e01;
}

.ftw-step-progress-check--complete svg {
    stroke: #ffffff;
}

/* Inline validation error (shown above submit button / sticky footer) */
.ftw-inline-error {
    padding: 8px 24px;
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    color: #d91616;
}

/* Full-fitting step form: pin the error above the sticky footer */
.ftw-step-form .ftw-inline-error {
    background: #1c1c1c;
    position: sticky;
    bottom: 76px;
    z-index: 9;
}

[data-ftw-theme="light"] .ftw-step-form .ftw-inline-error {
    background: #f8f8f8;
}

/* Step body content helpers (mirror Livewire spacing) */
.ftw-step-help {
    margin-top: 16px;
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #a1a1a1;
}

[data-ftw-theme="light"] .ftw-step-help {
    color: #707070;
}

.ftw-step-illustration {
    position: relative;
    aspect-ratio: 16 / 9;
    background: rgba(56, 56, 56, 0.3);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

/* "Unsure? Select carry distance instead" sub-link under step title */
.ftw-step-switch {
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    color: #a1a1a1;
    margin: 0 0 12px;
}

[data-ftw-theme="light"] .ftw-step-switch {
    color: #707070;
}

.ftw-step-switch-link {
    background: none;
    border: 0;
    padding: 0;
    margin-left: 4px;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.ftw-step-switch-link:hover {
    color: #f8f8f8;
}

[data-ftw-theme="light"] .ftw-step-switch-link:hover {
    color: #0b0b0b;
}

/* Unit toggle chips floating over the illustration (swing speed, carry distance) */
.ftw-unit-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 8px;
    z-index: 1;
}

.ftw-unit-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    min-width: 44px;
    padding: 4px 8px;
    box-sizing: border-box;
    border: 1px solid #707070;
    border-radius: 4px;
    background: transparent;
    color: #bababa;
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border 0.15s, background 0.15s, color 0.15s;
}

.ftw-unit-chip input {
    display: none;
}

.ftw-unit-chip:has(input:checked) {
    border: 2px solid #ff6e01;
    color: #f8f8f8;
}

[data-ftw-theme="light"] .ftw-unit-chip {
    border-color: #707070;
    color: #545454;
    background: rgba(255, 255, 255, 0.8);
}

[data-ftw-theme="light"] .ftw-unit-chip:has(input:checked) {
    border: 2px solid #ff6e01;
    color: #0b0b0b;
    background: #f8f8f8;
}

.ftw-step-illustration img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

[data-ftw-theme="light"] .ftw-step-illustration {
    background: rgba(11, 11, 11, 0.04);
}

[data-ftw-theme="light"] .ftw-step-illustration img {
    filter: invert(1);
}

/* Email text input */
.ftw-text-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    background: #0b0b0b;
    border: 1px solid #383838;
    color: #f8f8f8;
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.15s;
}

.ftw-text-input::placeholder {
    color: #707070;
}

.ftw-text-input:focus {
    outline: none;
    border-color: #ff6e01;
}

[data-ftw-theme="light"] .ftw-text-input {
    background: #f8f8f8;
    border-color: #bababa;
    color: #0b0b0b;
}

[data-ftw-theme="light"] .ftw-text-input::placeholder {
    color: #a1a1a1;
}

/* Consent checkbox row */
.ftw-consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
    cursor: pointer;
}

.ftw-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #ff6e01;
    flex-shrink: 0;
}

.ftw-consent span {
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #a1a1a1;
}

[data-ftw-theme="light"] .ftw-consent span {
    color: #707070;
}

/* Results page: per-card summary paragraph */
.ftw-result-summary {
    padding: 16px;
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: #a1a1a1;
}

.ftw-result-summary strong {
    color: #f8f8f8;
    font-weight: 700;
}

[data-ftw-theme="light"] .ftw-result-summary {
    color: #707070;
}

[data-ftw-theme="light"] .ftw-result-summary strong {
    color: #0b0b0b;
}

/* Results page: disclaimer */
.ftw-result-disclaimer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #383838;
    font-family: 'Barlow', sans-serif;
    font-size: 12px;
    line-height: 1.6;
    color: #a1a1a1;
}

[data-ftw-theme="light"] .ftw-result-disclaimer {
    color: #707070;
    border-top-color: #e5e5e5;
}

/* Wrist-to-floor reference table */
.ftw-wtf-table {
    margin-top: 16px;
    border: 1px solid #383838;
    border-radius: 8px;
    overflow: hidden;
}

[data-ftw-theme="light"] .ftw-wtf-table {
    border-color: #e5e5e5;
}

.ftw-wtf-table table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Barlow', sans-serif;
    font-size: 12px;
}

.ftw-wtf-table thead {
    background: rgba(56, 56, 56, 0.5);
}

[data-ftw-theme="light"] .ftw-wtf-table thead {
    background: rgba(11, 11, 11, 0.04);
}

.ftw-wtf-table th {
    text-align: left;
    padding: 8px 12px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #a1a1a1;
}

[data-ftw-theme="light"] .ftw-wtf-table th {
    color: #707070;
}

.ftw-wtf-table td {
    padding: 6px 12px;
    border-top: 1px solid #383838;
    color: #a1a1a1;
}

[data-ftw-theme="light"] .ftw-wtf-table td {
    color: #707070;
    border-top-color: #e5e5e5;
}

/* Row matching the user's height — highlighted background + bright text. */
.ftw-wtf-row--match {
    background: rgba(248, 248, 248, 0.06);
}

.ftw-wtf-row--match td {
    color: #f8f8f8;
}

[data-ftw-theme="light"] .ftw-wtf-row--match {
    background: #f0f0f0;
}

[data-ftw-theme="light"] .ftw-wtf-row--match td {
    color: #0b0b0b;
}