/**
 * LavaForm Pro - Professional Premium Wizard (v2.6)
 * Design Language: Modern Apple Desktop (Minimal, Smart, Trustworthy)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
    /* Colors - DNB Inspired Teal & Neutrals */
    --lf-color-primary: 178, 68%, 33%;
    /* DNB Teal */
    --lf-color-primary-dark: 178, 68%, 25%;
    --lf-color-bg: 0, 0%, 100%;
    /* Pure White */
    --lf-color-surface: 178, 20%, 98%;
    /* Sublest Teal Tint */
    --lf-color-text-main: 210, 10%, 12%;
    /* Near Black */
    --lf-color-text-sub: 210, 10%, 45%;
    /* Muted Grey */
    --lf-color-border: 210, 15%, 90%;
    --lf-color-success: 178, 68%, 33%;
    /* Reuse Brand Teal */
    --lf-color-error: 0, 72%, 51%;

    /* Shadows & Effects */
    --lf-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.04);
    --lf-shadow-elevated: 0 20px 40px rgba(0, 0, 0, 0.1);

    /* Radii & Spacing */
    --lf-radius-sm: 8px;
    --lf-radius-md: 12px;
    --lf-radius-lg: 20px;
}

/* =============================================
   MOBILE-FIRST RESET - CRITICAL FIX
   Prevents horizontal overflow on mobile devices
   ============================================= */
@media screen and (max-width: 768px) {

    .lavaform-wrapper,
    .lavaform-wrapper *,
    .lavaform-wrapper *::before,
    .lavaform-wrapper *::after {
        box-sizing: border-box !important;
    }

    .lavaform-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        overflow-x: hidden !important;
    }

    /* Safe area for notched devices (iPhone X+, etc.) */
    .lavaform-wrapper {
        padding-left: env(safe-area-inset-left) !important;
        padding-right: env(safe-area-inset-right) !important;
    }
}


/* Base Reset for Fonts */
.lavaform-wrapper,
.lavaform-wrapper button,
.lavaform-wrapper input,
.lavaform-wrapper select,
.lavaform-wrapper textarea {
    font-family: 'Inter', 'IBM Plex Sans Arabic', -apple-system, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Global Focus Style - Branding Fix */
.lavaform-wrapper *:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px hsla(var(--lf-color-primary), 0.15) !important;
    border-color: hsl(var(--lf-color-primary)) !important;
}

.lavaform-wrapper {
    font-family: 'Inter', 'IBM Plex Sans Arabic', -apple-system, system-ui, sans-serif;
    color: hsl(var(--lf-color-text-main));
    max-width: 1100px;
    margin: 40px auto;
    padding: 0;
    background: hsl(var(--lf-color-bg));
    border-radius: var(--lf-radius-lg);
    box-shadow: var(--lf-shadow-elevated);
    position: relative;
    /* overflow: hidden; */
    /* REMOVED: Integration with page scroll */
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Split Layout: Sidebar + Content */
.lf-split-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 600px;
}

/* Sidebar */
.lf-sidebar {
    background: linear-gradient(180deg, hsl(178, 40%, 96%) 0%, hsl(178, 30%, 93%) 100%);
    padding: 40px 30px;
    border-right: 1px solid hsl(var(--lf-color-border));
    display: flex;
    flex-direction: column;
}

.lf-sidebar-footer {
    margin-top: auto;
    padding-top: 30px;
}

.lavaform-language-selector {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px;
    border-radius: 20px;
    width: fit-content;
}

.lf-lang-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: hsl(var(--lf-color-text-sub));
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap !important;
}

.lf-lang-btn.active {
    background: white;
    color: hsl(var(--lf-color-primary));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.lf-lang-btn:hover {
    color: hsl(var(--lf-color-primary));
}

.lf-sidebar-header {
    margin-bottom: 40px;
}

.lf-form-title {
    font-size: 20px;
    font-weight: 700;
    color: hsl(var(--lf-color-text-main));
    margin: 0;
}

/* Vertical Stepper */
.lf-vertical-stepper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.lf-v-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    position: relative;
    opacity: 0.5;
    transition: all 0.3s ease;
}

/* Connecting line between steps */
.lf-v-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 48px;
    left: 15px;
    width: 2px;
    height: calc(100% - 16px);
    background: hsl(var(--lf-color-border));
    transition: background 0.6s ease;
}

[dir="rtl"] .lf-v-step:not(:last-child)::after {
    left: auto;
    right: 15px;
}

.lf-v-step.completed:not(:last-child)::after {
    background: hsl(var(--lf-color-success));
}

.lf-v-step.active:not(:last-child)::after {
    background: linear-gradient(180deg, hsl(var(--lf-color-success)) 0%, hsl(var(--lf-color-border)) 100%);
}

.lf-v-step-marker {
    width: 32px;
    height: 32px;
    background: hsl(var(--lf-color-surface));
    border: 2px solid hsl(var(--lf-color-border));
    color: hsl(var(--lf-color-text-sub));
    font-size: 13px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    z-index: 1;
}

.lf-v-step-label {
    font-size: 14px;
    font-weight: 600;
    color: hsl(var(--lf-color-text-sub));
    transition: all 0.3s ease;
}

.lf-v-step.active {
    opacity: 1;
}

.lf-v-step.active .lf-v-step-marker {
    background: hsl(var(--lf-color-primary));
    border-color: hsl(var(--lf-color-primary));
    color: white;
    box-shadow: 0 0 0 4px hsla(var(--lf-color-primary), 0.15);
}

.lf-v-step.active .lf-v-step-label {
    color: hsl(var(--lf-color-text-main));
    font-weight: 700;
}

.lf-v-step.completed {
    opacity: 1;
}

.lf-v-step.completed .lf-v-step-marker {
    background: hsl(var(--lf-color-success));
    border-color: hsl(var(--lf-color-success));
    color: white;
}

.lf-v-step.completed .lf-v-step-marker span {
    display: none;
}

.lf-v-step.completed .lf-v-step-marker::before {
    content: '✓';
    font-size: 14px;
    font-weight: 900;
}

.lf-v-step.skipped {
    display: none;
}

.lf-v-step.completed .lf-v-step-label {
    color: hsl(var(--lf-color-success));
}

.lf-content-area {
    padding: 40px 40px 20px;
    display: flex;
    flex-direction: column;
    background: white;
    min-height: 600px;
    /* Base height instead of overflow */
}

#lavaform-quotation-form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Visibility Fix: Only active step shows */
.lf-view {
    display: none;
    animation: lf-fade-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
}

.lf-view.active {
    display: block;
}

@keyframes lf-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step Header inside content */
.lf-wizard-header {
    margin-bottom: 32px;
    text-align: left;
}

[dir="rtl"] .lf-wizard-header {
    text-align: right;
}

.lf-step-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    color: hsl(var(--lf-color-text-main));
}

.lf-step-desc {
    color: hsl(var(--lf-color-text-sub));
    font-size: 14px;
    max-width: 100%;
    margin: 0;
    line-height: 1.6;
}

/* Language Selector - Handled in Sidebar Header/Footer */
.lf-sidebar .lavaform-language-selector {
    margin-bottom: 24px;
    background: rgba(0, 0, 0, 0.04);
}

.lf-lang-btn {
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: transparent;
    color: hsl(var(--lf-color-text-sub));
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap !important;
}

.lf-lang-btn:hover {
    color: hsl(var(--lf-color-text-main));
}

.lf-lang-btn.active {
    background: white;
    color: hsl(var(--lf-color-primary));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Inputs & Forms (High density, crisp) */
.lf-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.lf-input-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.lf-input-field {
    width: 100%;
    padding: 22px 16px 8px;
    border: 1px solid hsl(var(--lf-color-border));
    border-radius: var(--lf-radius-md);
    background: hsl(var(--lf-color-surface));
    font-size: 15px;
    color: hsl(var(--lf-color-text-main));
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    outline: none;
}

/* Floating Label - Fixed positioning to prevent overlap */
.lf-floating-label {
    position: absolute;
    top: 18px;
    left: 16px;
    color: hsl(var(--lf-color-text-sub));
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    z-index: 1;
}

[dir="rtl"] .lf-floating-label {
    left: auto;
    right: 16px;
}

/* Input field base padding */
.lf-input-field {
    width: 100%;
    padding: 20px 16px 8px !important;
    border: 1px solid hsl(var(--lf-color-border));
    border-radius: var(--lf-radius-md);
    background: hsl(var(--lf-color-surface));
    font-size: 15px;
    color: hsl(var(--lf-color-text-main));
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    outline: none;
}

/* Label floats up when input is focused or has value */
.lf-input-field:focus+.lf-floating-label,
.lf-input-field:not(:placeholder-shown)+.lf-floating-label,
.lf-input-field.has-value+.lf-floating-label {
    top: 6px;
    font-size: 10px;
    font-weight: 700;
    color: hsl(var(--lf-color-primary));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: white;
    padding: 0 4px;
    margin-left: -4px;
}

[dir="rtl"] .lf-input-field:focus+.lf-floating-label,
[dir="rtl"] .lf-input-field:not(:placeholder-shown)+.lf-floating-label,
[dir="rtl"] .lf-input-field.has-value+.lf-floating-label {
    margin-left: 0;
    margin-right: -4px;
}

.lf-input-field:focus,
.lf-input-field:not(:placeholder-shown) {
    background: white;
    border-color: hsl(var(--lf-color-primary));
    box-shadow: 0 0 0 4px hsl(var(--lf-color-primary), 0.08);
}

/* Custom Select Wrapper (Step 1 Country) */
.lf-select-wrapper {
    position: relative;
    width: 100%;
}


.lf-select-trigger {
    width: 100%;
    padding: 24px 16px 8px;
    border: 1px solid hsl(var(--lf-color-border));
    border-radius: var(--lf-radius-md);
    background: hsl(var(--lf-color-surface));
    font-size: 16px;
    color: hsl(var(--lf-color-text-main));
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    min-height: 64px;
}

.lf-select-wrapper.open .lf-select-trigger {
    background: white;
    border-color: hsl(var(--lf-color-primary));
    box-shadow: 0 0 0 4px hsl(var(--lf-color-primary), 0.08);
}

.lf-select-wrapper.error .lf-select-trigger {
    border-color: hsl(var(--lf-color-error));
    background: hsl(var(--lf-color-error), 0.02);
}

.lf-select-wrapper::before {
    content: attr(data-label);
    position: absolute;
    top: 10px;
    left: 16px;
    font-size: 11px;
    font-weight: 700;
    color: hsl(var(--lf-color-primary));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    pointer-events: none;
}

[dir="rtl"] .lf-select-wrapper::before {
    left: auto;
    right: 16px;
}

.lf-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid hsl(var(--lf-color-border));
    border-radius: var(--lf-radius-md);
    box-shadow: var(--lf-shadow-elevated);
    z-index: 1100;
    display: none;
    overflow: hidden;
    animation: lf-dropdown-in 0.2s ease-out;
}

.lf-select-wrapper.open .lf-select-dropdown {
    display: block;
}

@keyframes lf-dropdown-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lf-select-trigger:focus {
    outline: none;
}

#lf-country {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 0;
    width: 0;
}

.lf-error-tooltip {
    display: none;
    color: hsl(var(--lf-color-error));
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
    padding: 0 4px;
    animation: lf-fade-in 0.3s ease-out;
}

/* Phone Input Styling (LTR in RTL context) */
.lf-phone-input {
    text-align: left;
    direction: ltr;
}

.lf-phone-hint {
    position: absolute;
    top: calc(50% + 6px);
    left: 16px;
    transform: translateY(-50%);
    color: hsl(var(--lf-color-text-sub));
    font-size: 15px;
    pointer-events: none;
    opacity: 0;
    direction: ltr;
    transition: opacity 0.2s, transform 0.2s;
}

[dir="rtl"] .lf-phone-hint {
    left: 16px;
    right: auto;
    text-align: left;
}

/* Show hint only when focused and empty */
.lf-phone-input:focus:placeholder-shown~.lf-phone-hint {
    opacity: 0.4;
    transform: translateY(-50%);
}

/* Hide hint when typing or not focused */
.lf-phone-input:not(:placeholder-shown)~.lf-phone-hint,
.lf-phone-input:not(:focus)~.lf-phone-hint {
    opacity: 0;
}

.lf-select-search {
    padding: 12px;
    border-bottom: 1px solid hsl(var(--lf-color-border));
    background: hsl(var(--lf-color-surface), 0.5);
}

.lf-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid hsl(var(--lf-color-border));
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.lf-search-input:focus {
    border-color: hsl(var(--lf-color-primary));
}

.lf-select-options {
    max-height: 250px;
    overflow-y: auto;
    padding: 8px;
}

.lf-select-option {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    color: hsl(var(--lf-color-text-main));
}

.lf-select-option:hover {
    background: hsl(var(--lf-color-primary), 0.05);
    color: hsl(var(--lf-color-primary));
}

.lf-icon-chevron {
    font-size: 10px;
    color: hsl(var(--lf-color-text-sub));
    transition: transform 0.3s;
}

.lf-select-wrapper.open .lf-icon-chevron {
    transform: rotate(180deg);
}

/* Actions Bar */
.lf-actions {
    background: white;
    padding: 32px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid hsl(var(--lf-color-border));
    margin-top: 48px;
}


.lf-content-area {
    padding: 40px;
    display: flex;
    flex-direction: column;
    background: white;
    flex: 1;
}

.lf-btn {
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lf-btn-primary {
    background: hsl(var(--lf-color-primary));
    color: white !important;
}

.lf-btn-primary:hover {
    background: hsl(var(--lf-color-primary-dark));
    transform: scale(1.02);
}

.lf-btn-secondary {
    background: white;
    color: hsl(var(--lf-color-text-main)) !important;
    border: 1px solid hsl(var(--lf-color-border));
}

/* Mobile Specific Position for Language Switcher to avoid overlap */
@media (max-width: 768px) {
    .lf-sidebar-footer {
        margin: 20px 0;
        padding-top: 0;
    }
}

.lf-btn-minimal,
#lf-reset-btn {
    background: transparent;
    border: none;
    color: hsl(var(--lf-color-text-sub));
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.2s ease;
}

.lf-btn-minimal:hover,
#lf-reset-btn:hover {
    color: hsl(var(--lf-color-error));
}

/* Retry Button */
.lf-retry-btn {
    background: hsl(var(--lf-color-primary));
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    margin-top: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.lf-retry-btn:hover {
    background: hsl(var(--lf-color-primary-dark));
}

/* Card Selection (Step 2) */
.lf-card-radio {
    cursor: pointer;
    position: relative;
    display: block;
}

.lf-card-radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lf-card-radio .lf-card-visual {
    padding: 18px 22px;
    border: 1.5px solid hsl(var(--lf-color-border));
    background: white;
    border-radius: var(--lf-radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 16px;
}

.lf-card-radio:hover .lf-card-visual {
    border-color: hsl(var(--lf-color-primary), 0.3);
    background: hsl(var(--lf-color-primary), 0.01);
}

.lf-card-radio input:checked+.lf-card-visual {
    border-color: hsl(var(--lf-color-primary));
    background: hsl(var(--lf-color-primary), 0.04);
    box-shadow: 0 4px 15px hsla(var(--lf-color-primary), 0.08);
}

/* Luxury Radio indicator */
.lf-card-radio .lf-card-visual::after {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid hsl(var(--lf-color-border));
    border-radius: 50%;
    margin-inline-start: auto;
    transition: all 0.2s;
    background: white;
    flex-shrink: 0;
}

.lf-card-radio input:checked+.lf-card-visual::after {
    border-color: hsl(var(--lf-color-primary));
    background: hsl(var(--lf-color-primary));
    box-shadow: inset 0 0 0 4px white;
}

/* Modern Icons (Minimal) */
.lf-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}

.lf-icon-tiny {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.lf-icon-container-small {
    padding: 8px;
    color: hsl(var(--lf-color-primary));
    background: hsl(var(--lf-color-primary), 0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Step 2 Layout */
.lf-vertical-stack {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.lf-section-title {
    margin-bottom: 16px;
    font-weight: 700;
    font-size: 16px;
    color: hsl(var(--lf-color-text-main));
    position: relative;
    padding-inline-start: 12px;
}

.lf-section-title::before {
    content: "";
    position: absolute;
    inset-block: 4px;
    inset-inline-start: 0;
    width: 4px;
    background: hsl(var(--lf-color-primary));
    border-radius: 2px;
}

.lf-card-text {
    font-size: 14px;
    font-weight: 600;
    color: hsl(var(--lf-color-text-main));
}

/* RTL Support (100% Arabic) */
.lavaform-wrapper[dir="rtl"] {
    text-align: right;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    direction: rtl;
}

.lavaform-wrapper[dir="rtl"] .lf-floating-label {
    left: auto;
    right: 16px;
}

.lavaform-wrapper[dir="rtl"] .lf-btn-icon-next {
    transform: rotate(180deg);
}

.lavaform-wrapper[dir="rtl"] .lf-btn-icon-prev {
    transform: rotate(180deg);
}

/* =============================================
   MOBILE LAYOUT - COMPREHENSIVE FIX
   ============================================= */
@media screen and (max-width: 768px) {

    /* Main Wrapper - Absolute Prevention of Horizontal Scroll */
    .lavaform-wrapper {
        overflow-x: hidden !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    /* Split Layout - Stack vertically */
    .lf-split-layout {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: unset !important;
        width: 100% !important;
    }

    /* Sidebar - Compact horizontal stepper */
    .lf-sidebar {
        width: 100% !important;
        padding: 12px 16px !important;
        border-right: none !important;
        border-bottom: 1px solid hsl(var(--lf-color-border)) !important;
        flex-shrink: 0 !important;
    }

    /* Hide sidebar header on mobile */
    .lf-sidebar-header {
        display: none !important;
    }

    /* Sidebar footer - language switcher */
    .lf-sidebar-footer {
        margin-top: 15px !important;
        padding-top: 15px !important;
        order: 3 !important;
    }

    /* Stepper Layout - Compact Single Row for Mobile */
    .lf-vertical-stepper {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        /* BACK TO ONE LINE - User hated 2 lines */
        justify-content: space-between !important;
        gap: 2px !important;
        /* Drastically reduced gap */
        overflow-x: hidden !important;
        padding: 8px 10px !important;
        order: 2 !important;
        min-height: 45px !important;
    }

    .lf-vertical-stepper::-webkit-scrollbar {
        display: none !important;
    }

    /* Step items - Ultra Compact to avoid overflow */
    .lf-v-step {
        flex-direction: column !important;
        align-items: center !important;
        padding: 2px 0 !important;
        gap: 2px !important;
        min-width: 0 !important;
        flex: 1 1 0 !important;
        flex-shrink: 0 !important;
    }

    .lf-v-step:not(:last-child)::after {
        display: none !important;
    }

    .lf-v-step-marker {
        width: 20px !important;
        /* Smaller bubbles */
        height: 20px !important;
        font-size: 10px !important;
    }

    .lf-v-step-label {
        font-size: 7px !important;
        /* Tiny labels */
        white-space: nowrap !important;
        text-align: center !important;
        max-width: 45px !important;
        line-height: 1 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }

    /* Hide labels on VERY small screens to save space */
    @media screen and (max-width: 380px) {
        .lf-v-step-label {
            display: none !important;
        }
    }

    /* Content Area - proper padding for footer */
    .lf-content-area {
        width: 100% !important;
        padding: 20px 16px 120px 16px !important;
        /* Increased bottom padding */
        min-height: auto !important;
        flex: 1 !important;
    }

    /* All grids stack on mobile */
    .lf-grid-2 {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        grid-template-columns: unset !important;
    }

    /* Input groups */
    .lf-input-group {
        width: 100% !important;
    }

    /* Input fields - 16px font prevents iOS zoom */
    .lf-input-field,
    .lf-select-trigger,
    textarea {
        width: 100% !important;
        min-height: 56px !important;
        font-size: 16px !important;
    }

    /* Wizard header */
    .lf-wizard-header {
        margin-bottom: 20px !important;
    }

    .lf-step-title {
        font-size: 20px !important;
        line-height: 1.3 !important;
    }

    .lf-step-desc {
        font-size: 13px !important;
    }

    /* Language selector positioning */
    .lavaform-language-selector {
        position: relative !important;
        top: 0 !important;
        right: 0 !important;
        margin: 10px 0 !important;
        width: fit-content !important;
    }

    [dir="rtl"] .lavaform-language-selector {
        right: auto !important;
        left: 0 !important;
    }
}


/* Accordions (Step 3) */
.lf-category-accordion {
    margin-bottom: 12px;
    border: 1px solid hsl(var(--lf-color-border));
    border-radius: var(--lf-radius-md);
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
}

.lf-category-anchor {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lf-category-anchor:hover {
    background: hsl(var(--lf-color-surface));
}

.lf-cat-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lf-cat-name {
    font-weight: 700;
    font-size: 17px;
}

.lf-cat-count {
    font-size: 12px;
    background: hsl(var(--lf-color-border));
    padding: 2px 8px;
    border-radius: 10px;
    color: hsl(var(--lf-color-text-sub));
}

/* Chevron icon for accordions */
.lf-cat-chevron-icon {
    color: hsl(var(--lf-color-text-sub));
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.lf-category-accordion.open .lf-cat-chevron-icon {
    transform: rotate(180deg);
}

.lf-category-content {
    background: white;
    padding: 0 20px 20px;
}

/* List Table (Quiet List) */
.lf-quiet-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.lf-product-row {
    transition: all 0.2s ease;
    cursor: pointer;
}

.lf-product-row td {
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.lf-product-row td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.lf-product-row td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    text-align: end;
}

.lf-product-row:hover td {
    background: hsl(var(--lf-color-surface));
}

.lf-product-row.selected td {
    background: rgba(59, 130, 246, 0.04);
    border-color: rgba(59, 130, 246, 0.2);
}

.lf-product-name {
    font-weight: 500;
    color: hsl(var(--lf-color-text-main));
    font-size: 13px;
}

/* ===== NEW COMPACT PRODUCT GRID ===== */
.lf-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    padding: 16px 0;
}

.lf-product-grid-loading,
.lf-empty-products,
.lf-error-state {
    text-align: center;
    padding: 32px;
    color: hsl(var(--lf-color-text-sub));
    font-size: 14px;
}

.lf-product-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid hsl(var(--lf-color-border));
    border-radius: 8px;
    cursor: pointer;
    background: white;
    transition: all 0.15s ease;
    user-select: none;
}

.lf-product-item:hover {
    border-color: hsl(var(--lf-color-primary) / 0.4);
    background: hsl(var(--lf-color-surface));
}

.lf-product-item.selected {
    border-color: hsl(var(--lf-color-primary));
    background: hsl(var(--lf-color-primary) / 0.05);
}

.lf-product-item .lf-product-checkbox {
    width: 16px;
    height: 16px;
    min-width: 16px;
    accent-color: hsl(var(--lf-color-primary));
    cursor: pointer;
}

.lf-product-item .lf-product-name {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    flex: 1;
}

.lf-product-item .lf-product-thumb {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Smart text direction for mixed content */
[dir="auto"] {
    unicode-bidi: plaintext;
}

/* Sticky Selection Bar */
.lf-selection-bar-fixed {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    width: 90%;
    max-width: 800px;
}

.lf-selection-bar-fixed.visible {
    transform: translateX(-50%) translateY(0);
}

.lf-selection-bar-content {
    display: flex;
    align-items: center;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.lf-selection-bar-content::-webkit-scrollbar {
    display: none;
}

.lf-pill {
    background: hsl(var(--lf-color-primary));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* Step 4 Config Cards */
.lf-product-configurations {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lf-product-config-card {
    background: hsl(var(--lf-color-surface));
    border: 1px solid hsl(var(--lf-color-border));
    border-radius: var(--lf-radius-md);
    padding: 24px;
    display: flex;
    gap: 24px;
    position: relative;
    transition: all 0.3s ease;
}

.lf-product-config-card:hover {
    background: white;
    box-shadow: var(--lf-shadow-md);
    border-color: hsl(var(--lf-color-primary), 0.2);
}

.lf-config-img-wrap {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid hsl(var(--lf-color-border));
}

.lf-config-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lf-config-details {
    flex: 1;
}

.lf-config-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.lf-config-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.lf-remove-product {
    color: hsl(var(--lf-color-text-sub));
    cursor: pointer;
    font-size: 20px;
    transition: color 0.2s;
}

.lf-remove-product:hover {
    color: hsl(var(--lf-color-error));
}

.lf-config-meta {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    align-items: flex-end;
}

.lf-config-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lf-unit-price {
    font-weight: 700;
    font-size: 15px;
    color: hsl(var(--lf-color-text-main));
    height: 38px;
    /* Same as qty stepper height */
    display: flex;
    align-items: center;
}

.lf-col-price {
    text-align: end;
    align-items: flex-end;
}

/* Tooltips & Errors */
.lf-error-tooltip {
    display: none;
    margin-top: 6px;
    color: hsl(var(--lf-color-error));
    font-size: 12px;
    font-weight: 600;
    padding-inline-start: 4px;
    animation: lf-shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes lf-shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.lf-input-field.error {
    border-color: hsl(var(--lf-color-error)) !important;
    background: hsl(var(--lf-color-error), 0.02);
}

/* Modals */
.lf-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lf-modal-content {
    background: white;
    padding: var(--lf-spacing-lg);
    border-radius: var(--lf-radius-lg);
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: var(--lf-shadow-lg);
}

/* RTL Support Override */
.lavaform-wrapper[dir="rtl"] {
    text-align: right;
}

/* RTL Input/Textarea Direction Fix */
.lavaform-wrapper[dir="rtl"] .lf-input-field,
.lavaform-wrapper[dir="rtl"] textarea,
.lavaform-wrapper[dir="rtl"] input[type="text"] {
    direction: rtl;
    text-align: right;
}

.lavaform-wrapper[dir="rtl"] .lf-input-field::placeholder,
.lavaform-wrapper[dir="rtl"] textarea::placeholder,
.lavaform-wrapper[dir="rtl"] input[type="text"]::placeholder {
    direction: rtl;
    text-align: right;
}

.lavaform-wrapper[dir="rtl"] .lf-btn-icon-next {
    transform: rotate(180deg);
}

.lavaform-wrapper[dir="rtl"] .lf-btn-icon-prev {
    transform: rotate(180deg);
    order: 2;
}

.lavaform-wrapper[dir="rtl"] .lf-floating-label {
    left: auto;
    right: 16px;
}

/* Custom Glassmorphism Confirmation Modal */
.lf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    /* Ensure font inheritance from body/wizard */
    font-family: 'Inter', 'IBM Plex Sans Arabic', -apple-system, system-ui, sans-serif;
}

.lf-modal-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 440px;
    width: 90%;
    padding: 32px;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: start;
}

[dir="rtl"] .lf-modal-card {
    text-align: right;
}

.lf-modal-card.show {
    transform: scale(1);
    opacity: 1;
}

.lf-modal-header h3 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 800;
    color: hsl(var(--lf-color-text-main));
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.lf-modal-body p {
    margin: 0 0 32px;
    font-size: 15px;
    color: hsl(var(--lf-color-text-sub));
    line-height: 1.6;
}

.lf-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    direction: inherit;
}

.lf-modal-btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.lf-modal-cancel {
    background: rgba(0, 0, 0, 0.05);
    color: hsl(var(--lf-color-text-sub));
}

.lf-modal-cancel:hover {
    background: rgba(0, 0, 0, 0.1);
    color: hsl(var(--lf-color-text-main));
}

.lf-modal-confirm {
    background: hsl(var(--lf-color-error));
    color: white;
}

.lf-modal-confirm:hover {
    background: hsl(0, 72%, 45%);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px hsla(var(--lf-color-error), 0.3);
}

/* Responsiveness & Mobile Optimization */
@media (max-width: 480px) {
    .lf-modal-card {
        padding: 24px;
        width: 95%;
    }

    .lf-modal-footer {
        flex-direction: column-reverse;
        /* Put confirm at top, cancel at bottom on mobile */
        gap: 8px;
    }

    .lf-modal-btn {
        width: 100%;
        padding: 14px;
    }

    .lf-modal-header h3 {
        font-size: 19px;
    }
}

[dir="rtl"] .lf-modal-footer {
    justify-content: flex-start;
}

@media (max-width: 480px) and (dir="rtl") {
    [dir="rtl"] .lf-modal-footer {
        flex-direction: column-reverse;
    }
}

/* Animations Scroll Fix */
body.modal-open {
    overflow: hidden;
}

/* ============================= */
/* SUCCESS PAGE - Modern Redesign */
/* ============================= */

/* Full-width mode when success is shown */
.lf-split-layout.lf-success-mode {
    grid-template-columns: 1fr !important;
}

.lf-split-layout.lf-success-mode .lf-sidebar {
    display: none;
}

.lf-split-layout.lf-success-mode .lf-content-area {
    border-radius: var(--lf-radius-lg);
}

/* Success Container */
.lf-success-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    padding: 60px 40px;
    text-align: center;
    animation: lf-success-fade-in 0.6s ease-out;
}

@keyframes lf-success-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animated SVG Checkmark */
.lf-success-icon-wrapper {
    width: 100px;
    height: 100px;
    margin-bottom: 32px;
    position: relative;
}

.lf-success-checkmark {
    width: 100px;
    height: 100px;
}

.lf-checkmark-circle {
    stroke: hsl(var(--lf-color-success));
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    animation: lf-circle-draw 0.6s ease-out forwards;
}

.lf-checkmark-check {
    stroke: hsl(var(--lf-color-success));
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: lf-check-draw 0.4s ease-out 0.4s forwards;
}

@keyframes lf-circle-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes lf-check-draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Fallback static icon for older browsers */
.lf-success-icon-static {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, hsl(var(--lf-color-success)) 0%, hsl(178, 68%, 40%) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    box-shadow: 0 10px 40px hsla(var(--lf-color-success), 0.3);
}

.lf-success-icon-static svg {
    width: 40px;
    height: 40px;
    stroke: white;
    stroke-width: 3;
    fill: none;
}

/* Typography */
.lf-success-title {
    font-size: 28px;
    font-weight: 800;
    color: hsl(var(--lf-color-text-main));
    margin: 0 0 16px;
    letter-spacing: -0.5px;
    animation: lf-success-fade-in 0.6s ease-out 0.2s backwards;
}

.lf-success-subtitle {
    font-size: 16px;
    color: hsl(var(--lf-color-text-sub));
    max-width: 480px;
    margin: 0 auto 20px;
    line-height: 1.7;
    animation: lf-success-fade-in 0.6s ease-out 0.3s backwards;
}

/* Action Text - Important notice below subtitle */
.lf-success-action-text {
    font-size: 14px;
    color: hsl(var(--lf-color-text-main));
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.7;
    padding: 16px 24px;
    background: hsl(var(--lf-color-surface));
    border-radius: var(--lf-radius-md);
    border-left: 4px solid hsl(var(--lf-color-primary));
    text-align: start;
    animation: lf-success-fade-in 0.6s ease-out 0.35s backwards;
}

[dir="rtl"] .lf-success-action-text {
    border-left: none;
    border-right: 4px solid hsl(var(--lf-color-primary));
}

/* WhatsApp Support Button Style */
.lf-btn-whatsapp {
    color: #25D366 !important;
    border-color: #25D366 !important;
}

.lf-btn-whatsapp:hover {
    background: #25D366 !important;
    color: white !important;
}

/* Outline Button Style */
.lf-btn-outline {
    background: transparent;
    color: hsl(var(--lf-color-text-sub));
    border: 1.5px solid hsl(var(--lf-color-border));
    font-weight: 500;
}

.lf-btn-outline:hover {
    background: hsl(var(--lf-color-surface));
    color: hsl(var(--lf-color-primary));
    border-color: hsl(var(--lf-color-primary));
}

.lf-social-btn--website:hover {
    color: hsl(var(--lf-color-primary));
}

/* Reference Badge */
.lf-success-ref {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: hsl(var(--lf-color-surface));
    border: 1px solid hsl(var(--lf-color-border));
    border-radius: 30px;
    padding: 12px 24px;
    margin-bottom: 40px;
    animation: lf-success-fade-in 0.6s ease-out 0.4s backwards;
}

.lf-success-ref-label {
    font-size: 13px;
    font-weight: 600;
    color: hsl(var(--lf-color-text-sub));
}

.lf-success-ref-number {
    font-size: 15px;
    font-weight: 700;
    color: hsl(var(--lf-color-primary));
    font-family: 'SF Mono', 'Monaco', monospace;
}

/* Action Buttons */
.lf-success-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
    animation: lf-success-fade-in 0.6s ease-out 0.5s backwards;
}

.lf-success-actions .lf-btn {
    min-width: 180px;
    justify-content: center;
    padding: 14px 28px;
    font-size: 15px;
}

.lf-success-actions .lf-btn-primary {
    background: linear-gradient(135deg, hsl(var(--lf-color-primary)) 0%, hsl(var(--lf-color-primary-dark)) 100%);
    box-shadow: 0 4px 16px hsla(var(--lf-color-primary), 0.25);
}

.lf-success-actions .lf-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px hsla(var(--lf-color-primary), 0.35);
}

/* Social Media Section */
.lf-success-social {
    padding-top: 32px;
    border-top: 1px solid hsl(var(--lf-color-border));
    animation: lf-success-fade-in 0.6s ease-out 0.6s backwards;
}

.lf-success-social-label {
    font-size: 14px;
    font-weight: 600;
    color: hsl(var(--lf-color-text-sub));
    margin-bottom: 20px;
}

.lf-social-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.lf-social-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: hsl(var(--lf-color-surface));
    border: 1px solid hsl(var(--lf-color-border));
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: hsl(var(--lf-color-text-sub));
}

.lf-social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.lf-social-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* Social Button Colors */
.lf-social-btn--whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
    color: white;
}

.lf-social-btn--instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: #e6683c;
    color: white;
}

.lf-social-btn--facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
    color: white;
}

.lf-social-btn--website:hover {
    background: hsl(var(--lf-color-primary));
    border-color: hsl(var(--lf-color-primary));
    color: white;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .lf-success-container {
        padding: 40px 16px;
        min-height: 400px;
    }

    .lf-success-icon-wrapper {
        width: 80px;
        height: 80px;
        margin-bottom: 24px;
    }

    .lf-success-checkmark {
        width: 80px;
        height: 80px;
    }

    .lf-success-title {
        font-size: 20px;
        padding: 0 8px;
    }

    .lf-success-subtitle {
        font-size: 14px;
        padding: 0 8px;
    }

    .lf-success-actions {
        flex-direction: column !important;
        width: 100%;
        padding: 0;
        gap: 12px;
        box-sizing: border-box;
    }

    .lf-success-actions .lf-btn {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0;
        box-sizing: border-box;
    }

    .lf-social-buttons {
        gap: 8px;
        flex-wrap: wrap;
    }

    .lf-social-btn {
        width: 40px;
        height: 40px;
    }

    .lf-success-ref {
        padding: 10px 16px;
        margin-bottom: 24px;
        flex-direction: column;
        gap: 4px;
        border-radius: 16px;
    }
}

/* Logistics Step - Compact Package Numbers */
.lf-pkg-number {
    font-weight: 800;
    font-size: 16px;
    color: hsl(var(--lf-color-primary));
}

/* Hydration Loader (Phase 11 Fix) */
.lf-hydration-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border-radius: var(--lf-radius-lg);
    transition: opacity 0.5s ease, visibility 0.5s;
}

.lf-hydration-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.lf-hydration-loader .lf-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid hsl(var(--lf-color-border));
    border-top-color: hsl(var(--lf-color-primary));
    border-radius: 50%;
    animation: lf-spin 1s linear infinite;
}

.lf-hydration-loader p {
    font-size: 16px;
    font-weight: 600;
    color: hsl(var(--lf-color-text-main));
    margin: 0;
}

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

/* No sizes placeholder */
.lf-no-sizes-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    color: hsl(var(--lf-color-text-sub));
    font-size: 13px;
    background: hsl(var(--lf-color-surface));
    border-radius: var(--lf-radius-md);
    border: 1px dashed hsl(var(--lf-color-border));
    margin-top: 8px;
    min-height: 80px;
}

/* Animated Border for Size Chips */
@keyframes lf-border-dance {
    0% {
        background-position: 0% 0, 100% 100%, 0% 100%, 100% 0%;
    }

    100% {
        background-position: 100% 0, 0% 100%, 0% 0%, 100% 100%;
    }
}

.lf-size-chip:not(.added) {
    position: relative;
    /* Tiny line: 20% color, 80% transparent */
    background: linear-gradient(90deg, hsl(var(--lf-color-border)) 20%, transparent 20%),
        linear-gradient(90deg, hsl(var(--lf-color-border)) 20%, transparent 20%),
        linear-gradient(0deg, hsl(var(--lf-color-border)) 20%, transparent 20%),
        linear-gradient(0deg, hsl(var(--lf-color-border)) 20%, transparent 20%);
    background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
    background-size: 200% 1px, 200% 1px, 1px 200%, 1px 200%;
    /* Thinner line (1px) */
    background-position: 0% 0%, 100% 100%, 0% 100%, 100% 0%;
    animation: lf-border-dance 8s linear infinite;
    /* Much slower */

    border: 1px solid transparent;
    /* Maintain layout size but hide border */
    box-shadow: inset 0 0 0 1px hsla(var(--lf-color-border), 0.5);
    /* Faint static border */
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Enhancing the effect on hover */
.lf-size-chip:not(.added):hover {
    background: linear-gradient(90deg, hsl(var(--lf-color-primary)) 30%, transparent 30%),
        linear-gradient(90deg, hsl(var(--lf-color-primary)) 30%, transparent 30%),
        linear-gradient(0deg, hsl(var(--lf-color-primary)) 30%, transparent 30%),
        linear-gradient(0deg, hsl(var(--lf-color-primary)) 30%, transparent 30%);
    background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
    background-size: 200% 2px, 200% 2px, 2px 200%, 2px 200%;
    background-position: 0% 0%, 100% 100%, 0% 100%, 100% 0%;
    animation: lf-border-dance 3s linear infinite;
    /* Faster on hover */
    box-shadow: inset 0 0 0 1px hsla(var(--lf-color-primary), 0.2);
    transform: translateY(-2px);
}

/* =============================================
   MOBILE FOOTER & ACTIONS - STABLE POSITIONING
   ============================================= */
@media screen and (max-width: 768px) {

    /* Actions bar - Fixed bottom with safe area */
    .lf-actions {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        padding: 16px 20px !important;
        padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
        margin: 0 !important;
        border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05) !important;
        display: flex;
        /* REMOVED !important to allow JS toggling */
        flex-direction: row !important;
        gap: 12px !important;
        justify-content: space-between !important;
    }

    .lf-actions .lf-btn {
        flex: 1 !important;
        padding: 12px 10px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        border-radius: 12px !important;
        white-space: normal !important;
        /* Changed from nowrap to allow wrapping */
        letter-spacing: -0.2px !important;
        display: flex;
        /* REMOVED !important to allow JS toggling */
        align-items: center !important;
        justify-content: center !important;
        min-width: 0 !important;
        transition: all 0.3s ease !important;
        text-align: center !important;
        /* Ensure centered text when wrapping */
    }

    /* Override for hidden buttons on mobile */
    .lf-actions .lf-btn[style*="display: none"] {
        display: none !important;
    }

    /* Modern active state for buttons */
    .lf-actions .lf-btn:active {
        transform: scale(0.96) !important;
        opacity: 0.9 !important;
    }

    /* When keyboard is open, hide footer to prevent overlap */
    .keyboard-open .lf-actions {
        display: none !important;
    }

    /* Selection bar - hide on mobile (inline styles override) */
    .lf-selection-bar-fixed {
        display: none !important;
    }

    /* Card radio buttons - more compact */
    .lf-card-visual {
        padding: 14px 16px !important;
    }

    .lf-card-text {
        font-size: 13px !important;
        line-height: 1.4 !important;
    }

    /* Tables - make scrollable */
    .lf-table-responsive,
    .lf-quiet-table,
    .lf-review-table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Product configuration cards (Step 4) */
    .lf-card-body {
        grid-template-columns: 1fr !important;
    }

    .lf-config-meta {
        grid-template-columns: 1fr !important;
    }

    .lf-section-available {
        border-inline-end: none !important;
        padding-inline-end: 0 !important;
        padding-bottom: 12px !important;
        border-bottom: 1px solid hsl(var(--lf-color-border)) !important;
    }

    /* Confirmation box */
    .lf-confirmation-box {
        padding: 16px !important;
        margin-top: 24px !important;
    }

    .lf-confirm-text {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    /* Review cards */
    .lf-review-card {
        padding: 16px !important;
    }

    /* Step 3 packaging selector */
    .lf-pkg-options {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .lf-pkg-option-content {
        padding: 16px 12px !important;
    }
}

/* =============================================
   EXTRA SMALL SCREENS - ULTRA COMPACT
   ============================================= */
@media screen and (max-width: 380px) {
    .lf-content-area {
        padding: 16px 12px 100px 12px !important;
    }

    .lf-step-title {
        font-size: 18px !important;
    }

    .lf-step-desc {
        font-size: 12px !important;
    }

    .lf-btn {
        font-size: 13px !important;
        padding: 12px 14px !important;
    }

    .lf-input-field,
    .lf-select-trigger,
    textarea {
        font-size: 16px !important;
        padding: 18px 12px 6px !important;
    }

    .lf-floating-label {
        font-size: 13px !important;
    }

    .lf-v-step-label {
        font-size: 9px !important;
        max-width: 55px !important;
    }

    /* Language Switcher Fix */
    .lavaform-language-selector {
        width: 100% !important;
        display: flex !important;
        gap: 6px !important;
    }

    .lf-lang-btn {
        flex: 1 !important;
        padding: 10px 4px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
    }

    .lf-lang-btn:hover {
        color: hsl(var(--lf-color-primary)) !important;
    }
}

/* Force Sync: 2026-01-20 13:46 */