/**
 * LayerForge public styles.
 * Industrial, precise. Orange brand on deep neutrals. Mono + geometric sans.
 * Motion is purposeful - each transition reinforces a state change.
 */

:root {
    --lf-brand: #2D8CFF;
    --lf-brand-dark: #3A6EA5;
    --lf-accent: #111827;
    --lf-ink: #0B0E14;
    --lf-ink-2: #374151;
    --lf-muted: #6B7280;
    --lf-line: #E5E7EB;
    --lf-surface: #FFFFFF;
    --lf-surface-2: #F9FAFB;
    --lf-ok: #059669;
    --lf-warn: #D97706;
    --lf-error: #DC2626;
    --lf-radius: 10px;
    --lf-shadow: 0 1px 2px rgba(11,14,20,0.04), 0 4px 16px rgba(11,14,20,0.06);
    --lf-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --lf-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --lf-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

.lf-quote {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--lf-ink);
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 16px;
}
.lf-quote * { box-sizing: border-box; }
.lf-quote button { font-family: inherit; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
    .lf-quote *, .lf-quote *::before, .lf-quote *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ----- Step transitions ----- */
.lf-step { animation: lf-panel-fade 0.28s ease-out; }
.lf-step--enter-from-right { animation: lf-slide-from-right 0.35s var(--lf-ease-out); }
.lf-step--enter-from-left  { animation: lf-slide-from-left  0.35s var(--lf-ease-out); }
@keyframes lf-panel-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lf-slide-from-right { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes lf-slide-from-left  { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: translateX(0); } }

/* ----- Progress rail ----- */
.lf-steps {
    list-style: none;
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 0 0 28px;
}
.lf-steps li {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--lf-surface-2);
    border-radius: var(--lf-radius);
    font-size: 14px;
    color: var(--lf-muted);
    position: relative;
    overflow: hidden;
    transition: background 0.35s var(--lf-ease-out), color 0.35s var(--lf-ease-out);
}
.lf-steps li::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(45,140,255,0.08), transparent);
    transform: translateX(-100%);
}
.lf-steps li.is-active::before { animation: lf-sweep 0.8s var(--lf-ease-out); }
@keyframes lf-sweep { to { transform: translateX(100%); } }
.lf-steps li span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    background: var(--lf-surface);
    border: 1px solid var(--lf-line);
    border-radius: 50%;
    font-family: var(--lf-mono);
    font-size: 13px;
    color: var(--lf-ink);
    flex-shrink: 0;
    transition: background 0.3s var(--lf-ease-spring), border-color 0.3s, color 0.3s, transform 0.3s var(--lf-ease-spring);
}
.lf-steps li.is-active { background: var(--lf-ink); color: #fff; }
.lf-steps li.is-active span {
    background: var(--lf-brand);
    border-color: var(--lf-brand);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(45,140,255,0.15);
}
.lf-steps li.is-done {
    background: var(--lf-surface);
    border: 1px solid var(--lf-ok);
    color: var(--lf-ok);
}
.lf-steps li.is-done span {
    background: var(--lf-ok);
    border-color: var(--lf-ok);
    color: #fff;
}

/* ----- Dropzone ----- */
.lf-dropzone {
    border: 2px dashed var(--lf-line);
    border-radius: var(--lf-radius);
    padding: 48px 24px;
    text-align: center;
    background: var(--lf-surface-2);
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s, transform 0.2s var(--lf-ease-out);
}
.lf-dropzone:hover { border-color: var(--lf-ink-2); }
.lf-dropzone.is-dragover {
    border-color: var(--lf-brand);
    background: #FFF7F0;
    transform: scale(1.01);
    box-shadow: 0 0 0 4px rgba(45,140,255,0.08);
}
/*
 * Success flash - fires when an upload completes and is analyzed cleanly.
 * Brief green glow + bounce confirms the file is ready. Pairs with the
 * green border on the upload list row.
 */
.lf-dropzone.is-success {
    animation: lf-dropzone-success 0.8s var(--lf-ease-spring);
}
@keyframes lf-dropzone-success {
    0%   { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
    30%  { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0.18); border-color: var(--lf-ok); transform: scale(1.005); }
    60%  { box-shadow: 0 0 0 12px rgba(5, 150, 105, 0.06); border-color: var(--lf-ok); }
    100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}
.lf-dropzone__inner .lf-icon-upload {
    width: 48px;
    height: 48px;
    color: var(--lf-brand);
    display: block;
    margin: 0 auto 12px;
    transition: transform 0.4s var(--lf-ease-spring);
}
.lf-dropzone:hover .lf-icon-upload,
.lf-dropzone.is-dragover .lf-icon-upload { transform: translateY(-3px); }
.lf-dropzone__title { font-size: 18px; margin: 0 0 6px; font-weight: 600; }
.lf-dropzone__title button {
    background: none;
    border: 0;
    color: var(--lf-brand);
    text-decoration: underline;
    font: inherit;
    padding: 0;
    transition: color 0.2s;
}
.lf-dropzone__title button:hover { color: var(--lf-brand-dark); }
.lf-dropzone__meta {
    color: var(--lf-muted);
    font-size: 13px;
    font-family: var(--lf-mono);
    margin: 0;
}

/* ----- Upload list ----- */
.lf-uploads {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lf-uploads li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--lf-surface);
    border: 1px solid var(--lf-line);
    border-radius: var(--lf-radius);
    animation: lf-card-in 0.4s var(--lf-ease-spring);
    transition: border-color 0.2s, transform 0.2s;
}
.lf-uploads li:hover { transform: translateX(2px); }
.lf-uploads li.is-uploading { border-color: var(--lf-brand); }
.lf-uploads li.is-error     { border-color: var(--lf-error); animation: lf-shake 0.45s; }
.lf-uploads li.is-ready     { border-color: var(--lf-ok); }
@keyframes lf-card-in {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes lf-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}
.lf-uploads__name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.lf-uploads__meta { font-family: var(--lf-mono); font-size: 12px; color: var(--lf-muted); }
.lf-uploads__bar {
    width: 120px;
    height: 4px;
    background: var(--lf-line);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.lf-uploads__bar span {
    display: block;
    height: 100%;
    background: var(--lf-brand);
    transition: width 0.18s ease-out;
}
.lf-uploads li.is-uploading .lf-uploads__bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: lf-shimmer 1.2s linear infinite;
}
@keyframes lf-shimmer {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}
.lf-uploads__remove {
    background: transparent;
    border: 0;
    color: var(--lf-muted);
    font-size: 18px;
    padding: 0 4px;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}
.lf-uploads__remove:hover {
    color: var(--lf-error);
    transform: rotate(90deg) scale(1.2);
}
.lf-uploads__check {
    color: var(--lf-ok);
    font-size: 18px;
    animation: lf-pop 0.35s var(--lf-ease-spring);
}
.lf-uploads__partbadge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 6px;
    margin-left: 8px;
    background: var(--lf-brand);
    color: #fff;
    border-radius: 999px;
    vertical-align: middle;
    transform: translateY(-1px);
}
@keyframes lf-pop {
    from { opacity: 0; transform: scale(0); }
    to   { opacity: 1; transform: scale(1); }
}

/* ----- Buttons ----- */
.lf-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}
.lf-btn {
    padding: 12px 22px;
    border-radius: 8px;
    border: 0;
    font-size: 15px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: background 0.2s, color 0.2s, transform 0.12s, box-shadow 0.2s;
}
.lf-btn:active:not(:disabled) { transform: translateY(1px) scale(0.98); }
.lf-btn:hover:not(:disabled)  { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(11,14,20,0.08); }
.lf-btn--primary { background: var(--lf-brand); color: #fff; }
.lf-btn--primary:hover:not(:disabled) { background: var(--lf-brand-dark); box-shadow: 0 6px 18px rgba(45,140,255,0.3); }
.lf-btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }

/*
 * "Just enabled" pulse - when a primary button transitions from disabled to
 * enabled (e.g. once the upload analysis finishes), the JS adds this class
 * for ~1.2s. The double-ring radial pulse draws the user's eye to the
 * newly-actionable button.
 */
.lf-btn--just-enabled {
    animation: lf-btn-wake 1.2s var(--lf-ease-spring);
}
@keyframes lf-btn-wake {
    0%   { box-shadow: 0 0 0 0 rgba(45, 140, 255, 0.6), 0 0 0 0 rgba(45, 140, 255, 0.4); }
    40%  { box-shadow: 0 0 0 8px rgba(45, 140, 255, 0.15), 0 0 0 16px rgba(45, 140, 255, 0); }
    70%  { box-shadow: 0 0 0 12px rgba(45, 140, 255, 0.08), 0 0 0 24px rgba(45, 140, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(45, 140, 255, 0), 0 0 0 0 rgba(45, 140, 255, 0); }
}
.lf-btn--ghost {
    background: var(--lf-surface);
    border: 1px solid var(--lf-line);
    color: var(--lf-ink);
}
.lf-btn--ghost:hover { background: var(--lf-surface-2); }

.lf-btn__spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lf-spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}
@keyframes lf-spin { to { transform: rotate(360deg); } }

/* ----- Configure layout ----- */
.lf-configure {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
}

/*
 * v2 configure layout: 2 columns instead of 3.
 *   [ stage = viewer + stats + file list - flex ]   [ config sidebar 360 ]
 * The file list moved out of its dedicated left sidebar and now lives below
 * the stats strip inside the stage. This gives the viewer more horizontal
 * room and lets the file list reflow horizontally - better for landscapes
 * where you have a few files, and the new collapsible "folder" style for
 * multi-part 3MFs keeps the list short even when one upload contains many
 * printable items.
 */
.lf-configure--v2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}
.lf-config-stage {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}
.lf-config-sidebar {
    background: var(--lf-surface);
    border: 1px solid var(--lf-line);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px rgba(11, 14, 20, 0.04);
    /* Cap height so the summary stays visible when the page is short, and
       the inner scroll area handles any overflow in the controls list.
       The summary is now compact-by-default (just the total + caret) so
       the options scroll area has guaranteed room even on short viewports. */
    max-height: calc(100vh - 80px);
    position: sticky;
    top: 20px;
}
.lf-config-scroll {
    overflow-y: auto;
    padding: 20px 22px 8px;
    flex: 1;
    /* Guarantee the options have at least 280px of room before scrolling
       - that's enough to show material + color + finish at once even on
       short viewports. */
    min-height: 280px;
    /* Subtle scroll fade - fades the top/bottom edges so cut-off content
       hints at scrollability without a heavy scrollbar. */
    mask-image: linear-gradient(to bottom, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}
.lf-summary--sticky {
    margin: 0;
    border-top: 1px solid var(--lf-line);
    border-radius: 0;
    background: linear-gradient(180deg, #FFF8F2 0%, #FFFEFB 100%);
    padding: 18px 22px;
}
@media (max-width: 900px) {
    /* Below 900px the right-sidebar layout would crush the viewer column.
       Drop back to a single-column flow with the sidebar moved underneath. */
    .lf-configure--v2 {
        grid-template-columns: 1fr;
    }
    .lf-config-sidebar {
        max-height: none;
        position: static;
    }
    .lf-config-scroll {
        max-height: none;
        mask-image: none;
        -webkit-mask-image: none;
    }
}
/*
 * File list - horizontal strip placement (1.13.2 redesign).
 *
 * Sits ABOVE the viewer so customers with many files (or 3MFs with many
 * parts) can see and switch between them without scrolling past a wall
 * of options. Tabs scroll horizontally when they overflow; multi-part
 * folders still expand inline but are visually inset so the parent
 * filename stays scannable.
 */
.lf-file-tabs--strip {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 8px;
    /* Keep the strip from collapsing to nothing when there are no files
       yet (between upload step and configure step) - it briefly empties
       on first init. */
    min-height: 4px;
    /* Subtle scroll fade on the right edge so customers see there are
       more tabs to scroll to. */
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
    /* Hide scrollbar visually but keep scrolling functional. */
    scrollbar-width: thin;
}
.lf-file-tabs--strip::-webkit-scrollbar { height: 6px; }
.lf-file-tabs--strip::-webkit-scrollbar-thumb { background: var(--lf-line); border-radius: 3px; }
.lf-file-tabs--strip:empty {
    display: none; /* don't reserve space when there are no files */
}
.lf-file-tabs--strip .lf-file-tab {
    flex-shrink: 0; /* tabs don't shrink - they scroll horizontally */
    max-width: 220px;
}
.lf-file-tab {
    padding: 8px 14px;
    background: var(--lf-surface);
    border: 1px solid var(--lf-line);
    border-radius: 999px;
    text-align: left;
    font-size: 13px;
    cursor: pointer;
    max-width: 260px;
    transition: all 0.2s var(--lf-ease-out);
    animation: lf-card-in 0.35s var(--lf-ease-out) both;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.lf-file-tab:nth-child(2) { animation-delay: 0.04s; }
.lf-file-tab:nth-child(3) { animation-delay: 0.08s; }
.lf-file-tab:nth-child(4) { animation-delay: 0.12s; }
.lf-file-tab__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.lf-file-tab:hover {
    border-color: var(--lf-ink-2);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(11,14,20,0.06);
}
.lf-file-tab.is-active {
    background: var(--lf-ink);
    color: #fff;
    border-color: var(--lf-ink);
}

/*
 * File group - wraps a folder parent and its child rows together. The whole
 * group is its own flex item in the wrapping list, taking the full row so
 * children sit directly under their parent rather than reflowing among
 * unrelated tabs.
 */
.lf-file-group {
    flex-basis: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-radius: 12px;
    padding: 4px;
    background: rgba(45, 140, 255, 0.04);
    border: 1px dashed rgba(45, 140, 255, 0.25);
    animation: lf-card-in 0.35s var(--lf-ease-out) both;
}
.lf-file-tab--folder {
    background: var(--lf-surface);
    border-radius: 8px;
    font-weight: 600;
    border-color: rgba(45, 140, 255, 0.35);
    align-self: flex-start;
    max-width: 100%;
}
.lf-file-tab__chevron {
    display: inline-block;
    font-size: 11px;
    color: var(--lf-muted);
    transition: transform 0.25s var(--lf-ease-spring);
    flex-shrink: 0;
}
.lf-file-group.is-collapsed .lf-file-tab__chevron {
    transform: rotate(-90deg);
}
.lf-file-tab__folder-icon {
    font-size: 14px;
    flex-shrink: 0;
}
.lf-file-tab__count {
    flex-shrink: 0;
    background: var(--lf-brand);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    margin-left: auto;
    font-family: var(--lf-mono);
}
.lf-file-group__children {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-left: 22px;
    overflow: hidden;
    transition: max-height 0.3s var(--lf-ease-out), opacity 0.25s, padding-top 0.25s, padding-bottom 0.25s;
    max-height: 600px;
    padding-top: 4px;
    padding-bottom: 4px;
    opacity: 1;
}
.lf-file-group.is-collapsed .lf-file-group__children {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}
.lf-file-tab--child {
    font-size: 12px;
    padding: 6px 12px;
    /* Faint vertical guide line on the left of each child to visually
       reinforce the parent/child relationship. */
    position: relative;
}
.lf-file-tab--child::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 6px;
    height: 1px;
    background: rgba(45, 140, 255, 0.3);
}

/* ----- 3D viewer ----- */
.lf-viewer {
    position: relative;
    height: 380px;
    background: #0B0E14;
    background-image: radial-gradient(ellipse at center, #1a2333 0%, #0B0E14 70%);
    border-radius: var(--lf-radius);
    overflow: hidden;
    margin-bottom: 16px;
    animation: lf-viewer-in 0.5s var(--lf-ease-out);
}

/*
 * Print-bed scan animation. When pricing recalculates we briefly sweep a thin
 * orange light from the bottom of the viewer to the top, mimicking a print
 * head laying down a layer. Triggered by the JS adding `is-printing` to the
 * viewer container right after the price chip pulses.
 */
.lf-viewer::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    /* The "scan beam" is a 24px-tall band of orange glow that we slide upward
       through the viewer. background-position-y animates the gradient. */
    background: linear-gradient(
        to top,
        transparent 0%,
        transparent calc(50% - 12px),
        rgba(45, 140, 255, 0.0) calc(50% - 12px),
        rgba(45, 140, 255, 0.45) 50%,
        rgba(45, 140, 255, 0.0) calc(50% + 12px),
        transparent calc(50% + 12px),
        transparent 100%
    );
    background-size: 100% 200%;
    background-position: 0% 100%;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.2s;
}
.lf-viewer.is-printing::before {
    opacity: 1;
    animation: lf-print-scan 1.4s var(--lf-ease-out);
}
@keyframes lf-print-scan {
    0%   { background-position: 0% 100%; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { background-position: 0% 0%;   opacity: 0; }
}

/*
 * Layer-by-layer rising overlay - a faint horizontal grid that rises with the
 * scan, suggesting layers of plastic accumulating below the print head. Lives
 * on a sibling overlay that the JS toggles in lockstep with is-printing.
 */
.lf-viewer__printlayers {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 0%;
    pointer-events: none;
    z-index: 3;
    background-image:
        repeating-linear-gradient(
            to bottom,
            rgba(45, 140, 255, 0.06) 0px,
            rgba(45, 140, 255, 0.06) 1px,
            transparent 1px,
            transparent 4px
        );
    transition: height 1.4s var(--lf-ease-out), opacity 0.4s;
    opacity: 0;
}
.lf-viewer.is-printing .lf-viewer__printlayers {
    height: 100%;
    opacity: 1;
}

/*
 * Filament-loading animation. When the user picks a material, a glowing
 * orange dot streaks across the viewer from left to right, leaving a brief
 * trail - like filament being threaded into an extruder. It's a quick,
 * delightful confirmation that the material change registered, and gives
 * the viewer a sense of life between material clicks.
 *
 * Triggered by the JS adding `is-loading-filament` to the viewer for ~1s
 * after a material click.
 */
.lf-viewer__filament-trace {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 4px;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 4;
    opacity: 0;
}
.lf-viewer__filament-trace::before {
    /* The "filament tip" - a bright dot. */
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--lf-brand) 0%, rgba(45,140,255,0.4) 50%, transparent 100%);
    border-radius: 50%;
    box-shadow: 0 0 16px var(--lf-brand), 0 0 32px rgba(45, 140, 255, 0.5);
}
.lf-viewer__filament-trace::after {
    /* The trailing streak fading behind the tip. */
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 60%;
    height: 2px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, transparent 0%, rgba(45, 140, 255, 0.6) 100%);
    transform-origin: right center;
}
.lf-viewer.is-loading-filament .lf-viewer__filament-trace {
    animation: lf-filament-streak 0.9s var(--lf-ease-out);
}
@keyframes lf-filament-streak {
    0%   { opacity: 0; transform: translate(-15%, -50%) translateY(0); }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { opacity: 0; transform: translate(115%, -50%) translateY(0); }
}
@keyframes lf-viewer-in {
    from { opacity: 0; transform: scale(0.98); }
    to   { opacity: 1; transform: scale(1); }
}
.lf-viewer canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
}
.lf-viewer canvas:active { cursor: grabbing; }
.lf-viewer__hud {
    position: absolute;
    left: 16px;
    top: 16px;
    /* Reserve space for the price chip in the top-right (~120px wide + 16px gap).
       Without this cap, long filenames like "Tie_Pilot.3mf - Tie_Pilot.stl"
       run under the price label and look broken. */
    right: 152px;
    max-width: calc(100% - 168px);
    color: #fff;
    font-family: var(--lf-mono);
    font-size: 11px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    pointer-events: none;
    animation: lf-fade-in 0.6s 0.2s both;
    z-index: 2;
}
@keyframes lf-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lf-viewer__filename {
    opacity: 0.85;
    margin-bottom: 2px;
    /* Truncate with ellipsis when filename is too long for the reserved space. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lf-viewer__dims { opacity: 0.7; }
.lf-viewer__price {
    position: absolute;
    right: 16px;
    top: 16px;
    background: var(--lf-brand);
    color: #fff;
    padding: 5px 11px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
    font-family: var(--lf-mono);
    letter-spacing: -0.01em;
    animation: lf-fade-in 0.6s 0.3s both;
    z-index: 3; /* above HUD so even if widths fight, price wins */
    box-shadow: 0 4px 12px rgba(45,140,255,0.3);
    /* Faint inner highlight gives it a satisfying physical chip feel. */
    background-image: linear-gradient(180deg, rgba(255,255,255,0.12), transparent);
}
.lf-viewer__price.is-updating {
    animation: lf-price-pulse 0.5s var(--lf-ease-spring);
}
@keyframes lf-price-pulse {
    0%   { transform: scale(1); box-shadow: 0 4px 12px rgba(45,140,255,0.3); }
    40%  { transform: scale(1.12); box-shadow: 0 6px 24px rgba(45,140,255,0.6); }
    100% { transform: scale(1); box-shadow: 0 4px 12px rgba(45,140,255,0.3); }
}
.lf-viewer__controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 6px;
    z-index: 2;
}
.lf-viewer__controls button {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 6px;
    font-size: 16px;
    transition: background 0.2s, transform 0.2s var(--lf-ease-spring);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.lf-viewer__controls button:hover {
    background: rgba(45,140,255,0.3);
    transform: scale(1.1) rotate(-10deg);
}
.lf-viewer__hint {
    position: absolute;
    bottom: 16px;
    left: 16px;
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    font-family: var(--lf-mono);
    pointer-events: none;
    z-index: 2;
    animation: lf-fade-in 0.6s 0.5s both;
}
.lf-viewer__loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(11,14,20,0.8);
    color: #fff;
    font-size: 13px;
    gap: 12px;
    z-index: 3;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.lf-viewer__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: var(--lf-brand);
    border-radius: 50%;
    animation: lf-spin 0.8s linear infinite;
}
.lf-viewer__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-family: var(--lf-mono);
    z-index: 3;
    padding: 24px;
    text-align: center;
}

/* ----- Stats strip ----- */
.lf-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}
.lf-stats > div {
    background: var(--lf-surface-2);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: lf-stat-in 0.5s var(--lf-ease-out) both;
    transition: background 0.2s, transform 0.2s;
}
.lf-stats > div:nth-child(1) { animation-delay: 0.05s; }
.lf-stats > div:nth-child(2) { animation-delay: 0.1s; }
.lf-stats > div:nth-child(3) { animation-delay: 0.15s; }
.lf-stats > div:nth-child(4) { animation-delay: 0.2s; }
.lf-stats > div:nth-child(5) { animation-delay: 0.25s; }
.lf-stats > div:hover { background: #F0F2F5; transform: translateY(-2px); }
@keyframes lf-stat-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lf-stats span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lf-muted);
}
.lf-stats strong {
    font-family: var(--lf-mono);
    font-size: 14px;
    color: var(--lf-ink);
    transition: color 0.3s;
}
.lf-stats strong.is-updating {
    color: var(--lf-brand);
    animation: lf-flash 0.5s;
}
@keyframes lf-flash {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ----- Config rows ----- */
.lf-config__row {
    margin-bottom: 18px;
    animation: lf-fade-in 0.4s var(--lf-ease-out) both;
}
.lf-config__row:nth-child(1) { animation-delay: 0.05s; }
.lf-config__row:nth-child(2) { animation-delay: 0.1s; }
.lf-config__row:nth-child(3) { animation-delay: 0.15s; }
.lf-config__row:nth-child(4) { animation-delay: 0.2s; }
.lf-config__row:nth-child(5) { animation-delay: 0.25s; }
.lf-config__row:nth-child(6) { animation-delay: 0.3s; }
.lf-config__row > label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--lf-ink-2);
}
.lf-config__row--grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/*
 * Split row - qty on left, infill on right. Used in the v2 sidebar where
 * the rush toggle gets its own row underneath instead of being squashed
 * into the same line.
 */
.lf-config__row--split {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: end;
}

/*
 * Material list - vertical stack instead of grid. Each row is a full-width
 * card with a colored "tech" stripe on the left, the material name + price
 * in the middle, and the per-cm³ price on the right. The narrow sidebar
 * makes a list read more naturally than a grid would here.
 */
.lf-material-grid,
.lf-material-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lf-material-list button {
    display: grid;
    grid-template-columns: 4px 1fr auto;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 10px 12px 10px 0;
    background: var(--lf-surface);
    border: 1px solid var(--lf-line);
    border-radius: 10px;
    font-size: 13px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.15s var(--lf-ease-out), box-shadow 0.2s, background 0.2s;
    animation: lf-card-in 0.4s var(--lf-ease-out) both;
}
.lf-material-list button:nth-child(1) { animation-delay: 0.02s; }
.lf-material-list button:nth-child(2) { animation-delay: 0.05s; }
.lf-material-list button:nth-child(3) { animation-delay: 0.08s; }
.lf-material-list button:nth-child(4) { animation-delay: 0.11s; }
.lf-material-list button:nth-child(5) { animation-delay: 0.14s; }
.lf-material-list button:nth-child(6) { animation-delay: 0.17s; }
.lf-material-list button:nth-child(7) { animation-delay: 0.20s; }
.lf-material-list button:nth-child(8) { animation-delay: 0.23s; }
.lf-material-list button:hover {
    transform: translateX(2px);
    border-color: var(--lf-ink-2);
    box-shadow: 0 2px 8px rgba(11,14,20,0.06);
}
.lf-material-list button.is-selected {
    border-color: var(--lf-brand);
    background: linear-gradient(90deg, #FFF8F2 0%, var(--lf-surface) 60%);
    box-shadow: 0 0 0 3px rgba(45,140,255,0.10);
    animation: lf-select 0.3s var(--lf-ease-spring);
}
@keyframes lf-select {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.02); }
    100% { transform: scale(1); }
}
/* Color stripe on the left edge - orange when selected, neutral otherwise. */
.lf-material-list button .lf-stripe {
    width: 4px;
    align-self: stretch;
    background: var(--lf-line);
    transition: background 0.25s;
}
.lf-material-list button.is-selected .lf-stripe {
    background: var(--lf-brand);
}
.lf-material-list button .lf-mat-info {
    min-width: 0;
}
.lf-material-list button strong {
    display: block;
    font-weight: 600;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lf-material-list .lf-tech-badge {
    display: inline-block;
    font-family: var(--lf-mono);
    font-size: 9px;
    color: var(--lf-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    background: var(--lf-surface-2);
    border-radius: 999px;
    margin-bottom: 4px;
}
.lf-material-list .lf-material-price {
    color: var(--lf-brand);
    font-family: var(--lf-mono);
    font-size: 11px;
    font-weight: 600;
    padding-right: 10px;
    white-space: nowrap;
}
/* Click ripple - radiates from click point. JS sets --lf-ripple-x/y vars. */
.lf-material-list button::after {
    content: '';
    position: absolute;
    top: var(--lf-ripple-y, 50%);
    left: var(--lf-ripple-x, 50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(45, 140, 255, 0.35);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
}
.lf-material-list button.is-rippling::after {
    animation: lf-ripple 0.6s var(--lf-ease-out);
}
@keyframes lf-ripple {
    0%   { width: 0; height: 0; opacity: 0.6; }
    100% { width: 400px; height: 400px; opacity: 0; }
}

/* ----- Color swatches ----- */
.lf-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.lf-swatches button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--lf-line);
    cursor: pointer;
    transition: transform 0.2s var(--lf-ease-spring), box-shadow 0.2s;
    position: relative;
}
.lf-swatches button:hover {
    transform: scale(1.15) rotate(-8deg);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.lf-swatches button.is-selected {
    border-color: var(--lf-ink);
    box-shadow: 0 0 0 2px var(--lf-brand), 0 4px 12px rgba(0,0,0,0.15);
    animation: lf-select 0.4s var(--lf-ease-spring);
}
/* Larger variant for the v2 sidebar - bigger touch targets read more
   confidently in a tighter column. */
.lf-swatches--lg button {
    width: 40px;
    height: 40px;
    border-width: 3px;
}
.lf-swatches--lg button.is-selected::after {
    /* Inner check mark for the selected swatch. White or dark depending
       on the swatch color is impractical without JS, but a bright orange
       inset ring reads against any color. */
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}

/* ----- Pills (finish, layer height) ----- */
.lf-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.lf-pills button {
    padding: 7px 14px;
    background: var(--lf-surface);
    border: 1px solid var(--lf-line);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s var(--lf-ease-out);
}
.lf-pills button:hover {
    border-color: var(--lf-ink-2);
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 2px 6px rgba(11,14,20,0.06);
}
.lf-pills button:active { transform: translateY(0) scale(0.98); }
.lf-pills button.is-selected {
    background: var(--lf-ink);
    color: #fff;
    border-color: var(--lf-ink);
    animation: lf-select 0.3s var(--lf-ease-spring);
    box-shadow: 0 4px 10px rgba(11,14,20,0.18);
}

/* ----- Qty control ----- */
.lf-qty {
    display: inline-flex;
    align-items: stretch;
    border: 1.5px solid var(--lf-line);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--lf-surface);
}
.lf-qty:focus-within {
    border-color: var(--lf-brand);
    box-shadow: 0 0 0 3px rgba(45,140,255,0.12);
}
.lf-qty button {
    width: 40px;
    background: transparent;
    border: 0;
    font-size: 20px;
    font-weight: 500;
    color: var(--lf-ink-2);
    transition: background 0.15s, color 0.15s, transform 0.1s;
}
.lf-qty button:hover { background: var(--lf-brand); color: #fff; }
.lf-qty button:active { transform: scale(0.88); }
.lf-qty input {
    width: 56px;
    text-align: center;
    border: 0;
    background: transparent;
    font-family: var(--lf-mono);
    font-size: 17px;
    font-weight: 600;
    color: var(--lf-ink);
}
/* Hide native number spinners - the +/- buttons are the only way to change qty. */
.lf-qty input::-webkit-outer-spin-button,
.lf-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.lf-qty input[type=number] { -moz-appearance: textfield; }

/*
 * Custom range slider for infill. Native sliders look generic; we hide the
 * native track and overlay a styled .lf-slider__track underneath the input,
 * then style the thumb itself. The .lf-slider__fill width is updated via
 * JS so the orange fill grows as the user drags.
 */
.lf-slider {
    position: relative;
    height: 32px;
    display: flex;
    align-items: center;
}
.lf-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    width: 100%;
    height: 32px;
    margin: 0;
    position: relative;
    z-index: 2;
    cursor: pointer;
}
.lf-slider input[type="range"]::-webkit-slider-runnable-track {
    height: 32px;
    background: transparent;
}
.lf-slider input[type="range"]::-moz-range-track {
    height: 32px;
    background: transparent;
    border: 0;
}
.lf-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--lf-brand);
    box-shadow: 0 2px 8px rgba(45, 140, 255, 0.35);
    cursor: grab;
    margin-top: 0;
    transition: transform 0.15s var(--lf-ease-spring), box-shadow 0.2s;
}
.lf-slider input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--lf-brand);
    box-shadow: 0 2px 8px rgba(45, 140, 255, 0.35);
    cursor: grab;
    transition: transform 0.15s var(--lf-ease-spring);
}
.lf-slider input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.15); }
.lf-slider input[type="range"]:hover::-moz-range-thumb     { transform: scale(1.15); }
.lf-slider input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.2); box-shadow: 0 4px 14px rgba(45, 140, 255, 0.5); }
.lf-slider input[type="range"]:active::-moz-range-thumb     { cursor: grabbing; transform: scale(1.2); }
.lf-slider__track {
    position: absolute;
    left: 11px;
    right: 11px;
    top: 50%;
    height: 6px;
    transform: translateY(-50%);
    background: var(--lf-surface-2);
    border-radius: 999px;
    z-index: 1;
    pointer-events: none;
}
.lf-slider__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--lf-brand) 0%, var(--lf-brand-dark) 100%);
    border-radius: 999px;
    width: 16%; /* default 20%, normalized to slider min/max in JS */
    transition: width 0.15s var(--lf-ease-out);
    box-shadow: 0 0 8px rgba(45,140,255,0.35);
}
.lf-infill-readout {
    font-family: var(--lf-mono);
    font-size: 17px;
    font-weight: 700;
    color: var(--lf-brand);
    margin-left: 6px;
}
.lf-infill-unit {
    font-family: var(--lf-mono);
    font-size: 12px;
    color: var(--lf-muted);
    margin-left: 1px;
}
.lf-config__row > label {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

/*
 * iOS-style toggle for rush order. Hidden checkbox, animated track + thumb.
 * The track widens when checked and the thumb slides to the right.
 */
.lf-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 500 !important;
    user-select: none;
}
.lf-toggle input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.lf-toggle__track {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: var(--lf-surface-2);
    border: 1px solid var(--lf-line);
    transition: background 0.25s var(--lf-ease-out), border-color 0.25s;
    flex-shrink: 0;
}
.lf-toggle__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.18);
    transition: transform 0.25s var(--lf-ease-spring);
}
.lf-toggle input:checked ~ .lf-toggle__track {
    background: var(--lf-brand);
    border-color: var(--lf-brand);
}
.lf-toggle input:checked ~ .lf-toggle__track .lf-toggle__thumb {
    transform: translateX(20px);
}
.lf-toggle input:focus-visible ~ .lf-toggle__track {
    box-shadow: 0 0 0 3px rgba(45,140,255,0.25);
}
.lf-toggle__label { color: var(--lf-ink); }

/* ----- Summary (1.13.2 compact redesign) -----
 *
 * The full summary used to be a table that took 5+ rows of vertical
 * space inside the sticky sidebar. With many parts/files it pushed the
 * material/color/finish controls below the fold. The new compact version
 * collapses to a single-line head ("Estimated total · $X.XX") with a
 * disclosure caret; clicking expands the full breakdown inline.
 */
.lf-summary {
    background: var(--lf-surface-2);
    border-top: 1px solid var(--lf-line);
    margin: 0;
    padding: 0;
    transition: background 0.3s;
}
.lf-summary--compact {
    /* <details> by default - head is always visible, breakdown shows on
       open. */
}
.lf-summary--compact > summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.15s;
}
.lf-summary--compact > summary::-webkit-details-marker { display: none; }
.lf-summary--compact > summary:hover {
    background: rgba(45, 140, 255, 0.04);
}
.lf-summary__head-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--lf-muted);
    font-weight: 600;
    flex-shrink: 0;
}
.lf-summary__head-amount {
    font-family: var(--lf-mono);
    font-size: 22px;
    font-weight: 700;
    color: var(--lf-ink);
    margin-left: auto;
}
.lf-summary__head-toggle {
    color: var(--lf-muted);
    font-size: 12px;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.lf-summary--compact[open] .lf-summary__head-toggle {
    transform: rotate(180deg);
}
.lf-summary__breakdown {
    padding: 0 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--lf-muted);
}
.lf-summary__line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    transition: color 0.2s;
}
.lf-summary__line span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.lf-summary__line em {
    color: var(--lf-muted);
    font-style: normal;
    font-size: 12px;
}
.lf-summary__line span:last-child {
    font-family: var(--lf-mono);
    flex-shrink: 0;
    color: var(--lf-ink);
}
.lf-summary__divider {
    height: 1px;
    background: var(--lf-line);
    margin: 6px 0;
}
.lf-summary.is-updating .lf-summary__head-amount {
    background: #FFF7F0;
    border-radius: 4px;
    padding: 0 6px;
    margin: 0 -6px 0 auto;
}

/* =====================================================================
 * Step 3: Details - v2 redesign (1.13.4)
 *
 * Card-based grouped layout with brand-aligned typography. Replaces
 * the bare flat form grid with three logical sections - Contact,
 * Shipping address (with autocomplete dropdown), Notes - plus a
 * sticky order summary sidebar.
 * ===================================================================== */

.lf-details--v2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}
.lf-details__main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}
.lf-details__side {
    position: sticky;
    top: 20px;
    align-self: start;
}
@media (max-width: 900px) {
    .lf-details--v2 { grid-template-columns: 1fr; }
    .lf-details__side { position: static; }
}

/* Each detail card matches the visual feel of the configure-step sidebar:
   white surface, subtle border, soft shadow, rounded corners, with a
   header strip that has an icon + heading. */
.lf-detail-card {
    background: var(--lf-surface);
    border: 1px solid var(--lf-line);
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(11, 14, 20, 0.04);
    overflow: hidden;
    animation: lf-fade-in 0.35s var(--lf-ease-out) both;
}
.lf-detail-card:nth-child(1) { animation-delay: 0.02s; }
.lf-detail-card:nth-child(2) { animation-delay: 0.08s; }
.lf-detail-card:nth-child(3) { animation-delay: 0.14s; }
.lf-detail-card:nth-child(4) { animation-delay: 0.20s; }

.lf-detail-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--lf-line);
    background: linear-gradient(180deg, #FCFCFC 0%, var(--lf-surface) 100%);
}
.lf-detail-card__icon {
    font-size: 18px;
    line-height: 1;
}
.lf-detail-card__head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--lf-ink);
    letter-spacing: -0.01em;
}
.lf-detail-card__body {
    padding: 18px 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Field - same look across all detail cards. */
.lf-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
    color: var(--lf-ink-2);
    min-width: 0;
}
.lf-field__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: var(--lf-muted);
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.lf-field__req { color: var(--lf-brand); }
.lf-field__hint {
    font-size: 10px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    color: var(--lf-muted);
    font-style: italic;
}
.lf-field input,
.lf-field textarea,
.lf-field select {
    padding: 10px 12px;
    border: 1.5px solid var(--lf-line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    background: var(--lf-surface);
    color: var(--lf-ink);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    width: 100%;
    box-sizing: border-box;
}
.lf-field input:hover,
.lf-field textarea:hover,
.lf-field select:hover {
    border-color: var(--lf-ink-2);
}
.lf-field input:focus,
.lf-field textarea:focus,
.lf-field select:focus {
    outline: none;
    border-color: var(--lf-brand);
    box-shadow: 0 0 0 3px rgba(45, 140, 255, 0.12);
    background: #FFFEFB;
}
.lf-field textarea {
    resize: vertical;
    min-height: 70px;
    line-height: 1.5;
}

/* Multi-column field rows. */
.lf-field-row {
    display: grid;
    gap: 12px;
}
.lf-field-row--2 { grid-template-columns: 1fr 1fr; }
.lf-field-row--3 { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 600px) {
    .lf-field-row--2,
    .lf-field-row--3 {
        grid-template-columns: 1fr;
    }
}

/* Discount input (sidebar version, more compact than legacy). */
.lf-discount-v2 {
    display: flex;
    gap: 8px;
}
.lf-discount-v2 input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1.5px solid var(--lf-line);
    border-radius: 8px;
    font-family: var(--lf-mono);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.lf-discount-v2 input:focus {
    outline: none;
    border-color: var(--lf-brand);
    box-shadow: 0 0 0 3px rgba(45, 140, 255, 0.12);
}
.lf-btn--small {
    padding: 8px 14px !important;
    font-size: 12px !important;
}

/* Order summary in the v2 sidebar - the ::after lines style used to
   live inside .lf-order-summary so we keep that ID for the JS render. */
.lf-detail-card--summary .lf-order-summary--v2 {
    margin: 12px 0 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    animation: none;
}
.lf-detail-card--summary .lf-order-summary--v2 table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.lf-detail-card--summary .lf-order-summary--v2 td {
    padding: 4px 0;
    color: var(--lf-muted);
}
.lf-detail-card--summary .lf-order-summary--v2 td:last-child {
    text-align: right;
    font-family: var(--lf-mono);
    color: var(--lf-ink);
}
.lf-detail-card--summary .lf-order-summary--v2 tr.lf-order-summary__total td {
    border-top: 1.5px solid var(--lf-ink);
    padding-top: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--lf-ink);
    margin-top: 6px;
}

/* =====================================================================
 * Address autocomplete dropdown
 * ===================================================================== */
.lf-address-autocomplete {
    position: relative;
}
.lf-address-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--lf-surface);
    border: 1px solid var(--lf-line);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(11, 14, 20, 0.12), 0 2px 8px rgba(11, 14, 20, 0.04);
    max-height: 280px;
    overflow-y: auto;
    z-index: 50;
    animation: lf-fade-in 0.15s var(--lf-ease-out);
}
.lf-address-suggestion {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--lf-line);
    transition: background 0.1s;
}
.lf-address-suggestion:last-child { border-bottom: 0; }
.lf-address-suggestion:hover,
.lf-address-suggestion.is-active {
    background: rgba(45, 140, 255, 0.06);
}
.lf-address-suggestion__primary {
    font-size: 13px;
    font-weight: 500;
    color: var(--lf-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lf-address-suggestion__secondary {
    font-size: 11px;
    color: var(--lf-muted);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lf-address-suggestion--empty {
    cursor: default;
    color: var(--lf-muted);
    font-style: italic;
    font-size: 13px;
    padding: 14px;
    text-align: center;
}
.lf-address-suggestion--empty:hover {
    background: transparent;
}

/* =====================================================================
 * Legacy details (kept for backwards compat - old cached HTML)
 * ===================================================================== */
.lf-details {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}
@media (max-width: 768px) {
    .lf-details:not(.lf-details--v2) { grid-template-columns: 1fr; }
    .lf-configure { grid-template-columns: 1fr; }
    .lf-config__row--grid { grid-template-columns: 1fr; }
    .lf-stats { grid-template-columns: repeat(2, 1fr); }
}
.lf-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.lf-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--lf-ink-2);
    animation: lf-fade-in 0.35s var(--lf-ease-out) both;
}
.lf-form-grid input,
.lf-form-grid textarea,
.lf-form-grid select {
    padding: 10px 12px;
    border: 1px solid var(--lf-line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    background: var(--lf-surface);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.lf-form-grid input:focus,
.lf-form-grid textarea:focus {
    outline: none;
    border-color: var(--lf-brand);
    box-shadow: 0 0 0 3px rgba(45,140,255,0.15);
}
.lf-form-grid .lf-full { grid-column: 1 / -1; }
.lf-honeypot { position: absolute; left: -9999px; }

.lf-discount {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    align-items: center;
}
.lf-discount input {
    padding: 10px 12px;
    border: 1px solid var(--lf-line);
    border-radius: 8px;
    font-family: var(--lf-mono);
    text-transform: uppercase;
    flex: 0 0 200px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.lf-discount input:focus {
    outline: none;
    border-color: var(--lf-brand);
    box-shadow: 0 0 0 3px rgba(45,140,255,0.15);
}
.lf-discount button {
    padding: 10px 16px;
    background: var(--lf-ink);
    color: #fff;
    border: 0;
    border-radius: 8px;
    transition: background 0.2s, transform 0.1s;
}
.lf-discount button:hover { background: var(--lf-brand); }
.lf-discount button:active { transform: scale(0.96); }
.lf-discount__msg { font-size: 13px; animation: lf-fade-in 0.3s; margin: 6px 0 0; min-height: 1em; }
.lf-discount__msg.is-valid { color: var(--lf-ok); }
.lf-discount__msg.is-invalid { color: var(--lf-error); }

.lf-order-summary {
    background: var(--lf-surface-2);
    border-radius: var(--lf-radius);
    padding: 20px;
    align-self: start;
    position: sticky;
    top: 20px;
    font-size: 14px;
    animation: lf-slide-from-right 0.4s var(--lf-ease-out);
}

/* ----- Review ----- */
.lf-review {
    background: var(--lf-surface-2);
    border-radius: var(--lf-radius);
    padding: 24px;
    animation: lf-card-in 0.4s var(--lf-ease-out);
}
.lf-review h3 { margin: 0 0 12px; }
.lf-review table { width: 100%; border-collapse: collapse; }
.lf-review th, .lf-review td {
    padding: 8px 6px;
    text-align: left;
    border-bottom: 1px solid var(--lf-line);
    font-size: 13px;
}
.lf-review tbody tr {
    animation: lf-fade-in 0.35s var(--lf-ease-out) both;
}
.lf-review tbody tr:nth-child(1) { animation-delay: 0.05s; }
.lf-review tbody tr:nth-child(2) { animation-delay: 0.1s; }
.lf-review tbody tr:nth-child(3) { animation-delay: 0.15s; }
.lf-terms { display: block; margin-top: 20px; font-size: 14px; }
.lf-terms input[type="checkbox"] {
    accent-color: var(--lf-brand);
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 6px;
}

/* ----- Success ----- */
.lf-success {
    text-align: center;
    padding: 40px 20px;
    position: relative;
    animation: lf-success-in 0.6s var(--lf-ease-out);
}
@keyframes lf-success-in {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lf-success h2 {
    font-size: 28px;
    margin: 24px 0 8px;
    animation: lf-fade-in 0.6s 0.3s both;
}
.lf-success > p {
    animation: lf-fade-in 0.6s 0.4s both;
}
.lf-quote-number {
    font-family: var(--lf-mono);
    font-size: 20px;
    color: var(--lf-brand);
    font-weight: 600;
    margin: 12px 0;
    animation: lf-fade-in 0.6s 0.5s both;
    display: inline-block;
    padding: 6px 14px;
    background: #FFF7F0;
    border-radius: 8px;
    letter-spacing: 0.05em;
}
.lf-check { width: 80px; height: 80px; margin: 0 auto; display: block; }
.lf-check__circle { stroke: var(--lf-ok); stroke-dasharray: 166; stroke-dashoffset: 166; animation: lf-circle 0.6s ease-out forwards; }
.lf-check__mark    { stroke: var(--lf-ok); stroke-dasharray: 48; stroke-dashoffset: 48; animation: lf-mark 0.4s 0.4s ease-out forwards; }
@keyframes lf-circle { to { stroke-dashoffset: 0; } }
@keyframes lf-mark   { to { stroke-dashoffset: 0; } }
.lf-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

.lf-success-details {
    margin: 24px auto 0;
    max-width: 400px;
    padding: 20px;
    background: var(--lf-surface-2);
    border-radius: var(--lf-radius);
    font-size: 14px;
    animation: lf-fade-in 0.6s 0.6s both;
    text-align: left;
}
.lf-success-details div {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}
.lf-success-details div + div {
    border-top: 1px solid var(--lf-line);
}
.lf-success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    animation: lf-fade-in 0.6s 0.7s both;
    flex-wrap: wrap;
}

/* ----- Quote history table ----- */
.lf-quote-history table { width: 100%; border-collapse: collapse; }
.lf-quote-history th, .lf-quote-history td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--lf-line);
}
.lf-quote-history tr { transition: background 0.2s; }
.lf-quote-history tbody tr:hover { background: var(--lf-surface-2); }

/* ----- Badges ----- */
.lf-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--lf-line);
    color: var(--lf-ink-2);
}
.lf-badge--pending       { background: #FEF3C7; color: #92400E; }
.lf-badge--reviewed      { background: #DBEAFE; color: #1E40AF; }
.lf-badge--approved      { background: #D1FAE5; color: #065F46; }
.lf-badge--in_production { background: #EDE9FE; color: #5B21B6; }
.lf-badge--shipped       { background: #CFFAFE; color: #155E75; }
.lf-badge--completed     { background: #D1FAE5; color: #065F46; }
.lf-badge--cancelled     { background: #FEE2E2; color: #991B1B; }
.lf-badge--expired       { background: #F3F4F6; color: #6B7280; }

/* ----- Tracker ----- */
.lf-tracker__form {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}
.lf-tracker__form input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--lf-line);
    border-radius: 8px;
    font-family: var(--lf-mono);
    text-transform: uppercase;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.lf-tracker__form input:focus {
    outline: none;
    border-color: var(--lf-brand);
    box-shadow: 0 0 0 3px rgba(45,140,255,0.15);
}
.lf-tracker__form button {
    padding: 12px 24px;
    background: var(--lf-brand);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}
.lf-tracker__form button:hover {
    background: var(--lf-brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45,140,255,0.25);
}
.lf-timeline {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: space-between;
    position: relative;
    --lf-timeline-progress: 0%;
}
/* Background rail (uncompleted portion) */
.lf-timeline::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 5%;
    right: 5%;
    height: 2px;
    background: var(--lf-line);
    z-index: 0;
}
/* Filled rail (progress portion) - animates to --lf-timeline-progress when JS sets it */
.lf-timeline::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 5%;
    height: 2px;
    background: linear-gradient(90deg, var(--lf-brand) 0%, var(--lf-brand-dark) 100%);
    width: calc(var(--lf-timeline-progress) * 0.9);
    z-index: 0;
    transition: width 0.8s var(--lf-ease-out);
    box-shadow: 0 0 8px rgba(45, 140, 255, 0.4);
}
.lf-timeline li {
    position: relative;
    flex: 1;
    text-align: center;
    z-index: 1;
    animation: lf-fade-in 0.5s var(--lf-ease-out) both;
}
.lf-timeline li:nth-child(1) { animation-delay: 0.05s; }
.lf-timeline li:nth-child(2) { animation-delay: 0.10s; }
.lf-timeline li:nth-child(3) { animation-delay: 0.15s; }
.lf-timeline li:nth-child(4) { animation-delay: 0.20s; }
.lf-timeline li:nth-child(5) { animation-delay: 0.25s; }
.lf-timeline li:nth-child(6) { animation-delay: 0.30s; }
.lf-timeline li::before {
    content: '';
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--lf-line);
    margin: 0 auto 6px;
    transition: background 0.4s var(--lf-ease-spring), border-color 0.4s, transform 0.4s var(--lf-ease-spring), box-shadow 0.4s;
    position: relative;
}
.lf-timeline li.is-done::before {
    background: var(--lf-brand);
    border-color: var(--lf-brand);
    box-shadow: 0 2px 8px rgba(45, 140, 255, 0.35);
}
.lf-timeline li.is-current::before {
    background: #fff;
    border-color: var(--lf-brand);
    box-shadow: 0 0 0 4px rgba(45,140,255,0.2);
    transform: scale(1.15);
    animation: lf-pulse 2s ease-in-out infinite;
}
/*
 * "Just lit" flash - applied for ~700ms when a node first gets is-done or
 * is-current via the cascading tracker animation. The radial pop draws the
 * eye to each node as it activates so the user sees the path light up
 * sequentially rather than all at once.
 */
.lf-timeline li.is-just-lit::before {
    animation: lf-node-light 0.7s var(--lf-ease-spring);
}
@keyframes lf-node-light {
    0%   { transform: scale(0.6); box-shadow: 0 0 0 0 rgba(45, 140, 255, 0.8); }
    40%  { transform: scale(1.35); box-shadow: 0 0 0 12px rgba(45, 140, 255, 0); }
    100% { transform: scale(1); box-shadow: 0 2px 8px rgba(45, 140, 255, 0.35); }
}
.lf-timeline li.is-current.is-just-lit::before {
    animation: lf-node-light-current 0.7s var(--lf-ease-spring);
}
@keyframes lf-node-light-current {
    0%   { transform: scale(0.6); box-shadow: 0 0 0 0 rgba(45, 140, 255, 0.8); }
    40%  { transform: scale(1.4); box-shadow: 0 0 0 14px rgba(45, 140, 255, 0); }
    100% { transform: scale(1.15); box-shadow: 0 0 0 4px rgba(45,140,255,0.2); }
}
@keyframes lf-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(45,140,255,0.2); }
    50%      { box-shadow: 0 0 0 8px rgba(45,140,255,0.08); }
}
.lf-timeline span {
    font-size: 12px;
    color: var(--lf-muted);
    transition: color 0.4s, font-weight 0.4s;
}
.lf-timeline li.is-done span,
.lf-timeline li.is-current span {
    color: var(--lf-ink);
    font-weight: 600;
}

.lf-notice {
    padding: 16px;
    background: var(--lf-surface-2);
    border-radius: var(--lf-radius);
    color: var(--lf-muted);
}

/* =====================================================================
 * Item-level shortcuts in configure sidebar (1.13.6)
 *
 * The "Copy to all" + "Duplicate this part" buttons + per-item notes
 * textarea sit at the bottom of the config-scroll. Compact and quiet
 * by default so they don't compete with the main material/color picks.
 * ===================================================================== */

.lf-config__row--actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--lf-line);
}
.lf-config__row--actions .lf-btn--small {
    flex: 1;
    min-width: 0;
    padding: 6px 10px !important;
    font-size: 11px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lf-config__hint {
    font-size: 10px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    color: var(--lf-muted);
    font-style: italic;
}
[data-lf-item-notes] {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid var(--lf-line);
    border-radius: 6px;
    font-family: inherit;
    font-size: 12px;
    background: var(--lf-surface);
    resize: vertical;
    min-height: 50px;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
[data-lf-item-notes]:focus {
    outline: none;
    border-color: var(--lf-brand);
    box-shadow: 0 0 0 3px rgba(45, 140, 255, 0.12);
}

/* =====================================================================
 * Smart upload warnings (1.13.7) - chips that surface oversize / thin
 * wall / non-watertight issues right next to the part stats. Color-coded
 * but kept calm: warnings, not errors.
 * ===================================================================== */
.lf-warnings {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}
.lf-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-left: 3px solid #f59e0b;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: #92400e;
    animation: lf-fade-in 0.3s var(--lf-ease-out);
}
.lf-warning--oversize {
    background: #fee2e2;
    border-color: #fecaca;
    border-left-color: #dc2626;
    color: #991b1b;
}
.lf-warning__icon {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1.3;
}
.lf-warning__text {
    flex: 1;
    min-width: 0;
}

/* =====================================================================
 * Cart resume banner (1.13.7) - non-modal "welcome back" prompt
 * shown when a saved draft is detected on page load.
 * ===================================================================== */
.lf-resume-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    margin: 0 0 18px;
    background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
    border: 1px solid #FED7AA;
    border-left: 4px solid var(--lf-brand);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(45, 140, 255, 0.08);
    animation: lf-fade-in 0.4s var(--lf-ease-out);
    flex-wrap: wrap;
}
.lf-resume-banner__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--lf-ink);
}
.lf-resume-banner__text strong {
    font-weight: 600;
    color: var(--lf-ink);
}
.lf-resume-banner__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Print time meta line in summary breakdown - italic + muted, sits below
   the totals section as info, not part of the price. */
.lf-summary__line--meta {
    font-style: italic;
    color: var(--lf-muted);
    font-size: 12px;
    margin-top: 4px;
}
.lf-summary__line--meta span:last-child {
    font-style: normal;
}

/* =====================================================================
 * Theme integration helpers (1.13.8)
 *
 * Density and animation preferences come in as data attributes on the
 * wizard root. CSS rules consult them to tighten/loosen spacing and
 * disable motion globally.
 * ===================================================================== */

/* Density - compact tightens internal gaps; spacious loosens them.
   The --lf-space variable is set to a multiplier from PHP (0.85, 1, 1.15)
   and consumed where layouts have meaningful breathing room. */
.lf-quote-widget[data-density="compact"] .lf-step { padding: calc(20px * var(--lf-space, 0.85)); }
.lf-quote-widget[data-density="spacious"] .lf-step { padding: calc(20px * var(--lf-space, 1.15)); }
.lf-quote-widget[data-density="compact"] .lf-detail-card__body { padding: 12px 16px; gap: 10px; }
.lf-quote-widget[data-density="spacious"] .lf-detail-card__body { padding: 24px 28px; gap: 18px; }

/* Animation level - subtle drops slide animations and confetti, none
   removes most transitions entirely (still keeps focus rings + hovers
   for accessibility). */
.lf-quote-widget[data-animations="none"] *,
.lf-quote-widget[data-animations="none"] *::before,
.lf-quote-widget[data-animations="none"] *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.05s !important;
}
.lf-quote-widget[data-animations="subtle"] .lf-step { animation: none; }

/* Logo block at the top of the wizard. */
.lf-quote-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
.lf-quote-logo img {
    max-height: 48px;
    width: auto;
    object-fit: contain;
}

/* Always honor the visitor's prefers-reduced-motion regardless of admin
   settings - accessibility wins over branding. */
@media (prefers-reduced-motion: reduce) {
    .lf-quote-widget *,
    .lf-quote-widget *::before,
    .lf-quote-widget *::after {
        animation-duration: 0.001s !important;
        transition-duration: 0.05s !important;
    }
}

/* =====================================================================
 * Distinctive animations layer (1.13.9)
 *
 * Motion language: 3D-printing as metaphor. Things layer up, extrude,
 * unspool, materialize. Honors prefers-reduced-motion via the existing
 * global rule + the [data-animations="none"] data attribute.
 *
 * Most idle animations are slow loops (4-8s) that fade into the page;
 * action animations (clicks, completions) are short and snappy
 * (200-700ms). No JS-driven animation - class toggles only.
 * ===================================================================== */

/* ============================================
 * 1. Hexagon breathing - empty dropzone
 * ============================================ */
.lf-dropzone__icon {
    animation: lf-hex-breathe 3.8s var(--lf-ease-out) infinite;
    transform-origin: center center;
}
@keyframes lf-hex-breathe {
    0%, 100% { transform: scale(1);    opacity: 0.85; }
    50%      { transform: scale(1.06); opacity: 1; }
}
.lf-dropzone:hover .lf-dropzone__icon { animation-duration: 2s; }

/* ============================================
 * 2. Layer-build dropzone idle (8s+ inactivity)
 * ============================================
 * After the dropzone has been visible without files for 8s, faint
 * horizontal lines drift up - like a print growing. JS adds .is-idle.
 */
.lf-dropzone {
    position: relative;
    overflow: hidden;
}
.lf-dropzone.is-idle::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        to top,
        transparent 0,
        transparent 14px,
        rgba(45, 140, 255, 0.07) 15px,
        rgba(45, 140, 255, 0.07) 16px,
        transparent 17px,
        transparent 28px
    );
    animation: lf-layer-rise 8s linear infinite;
    transition: opacity 0.6s;
}
@keyframes lf-layer-rise {
    0%   { background-position: 0 0; }
    100% { background-position: 0 -56px; }
}
.lf-dropzone.is-uploading::before,
.lf-dropzone:hover::before { opacity: 0; }

/* ============================================
 * 3. File materialization on upload complete
 * ============================================
 * Tab "prints in" from the bottom up with a glowing scan line at the
 * leading edge - like an FDM head extruding it into existence.
 */
.lf-file-tab.is-printing {
    animation: lf-tab-materialize 0.7s var(--lf-ease-out) both;
    position: relative;
}
.lf-file-tab.is-printing::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--lf-brand) 40%,
        var(--lf-brand) 60%,
        transparent 100%);
    box-shadow: 0 0 8px var(--lf-brand);
    animation: lf-tab-print-scan 0.7s var(--lf-ease-out) both;
}
@keyframes lf-tab-materialize {
    0%   { clip-path: inset(0 0 100% 0); opacity: 0; }
    50%  { opacity: 1; }
    100% { clip-path: inset(0 0 0 0);    opacity: 1; }
}
@keyframes lf-tab-print-scan {
    0%   { top: 100%; opacity: 1; }
    99%  { top: 0;    opacity: 1; }
    100% { top: 0;    opacity: 0; }
}

/* ============================================
 * 4. Filament unspool loader
 * ============================================ */
.lf-viewer__spinner {
    width: 48px;
    height: 48px;
    position: relative;
    border: none;
    background: transparent;
    border-radius: 0;
    animation: none;
}
.lf-viewer__spinner::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 2px dashed var(--lf-brand);
    border-right-color: transparent;
    border-bottom-color: transparent;
    animation: lf-filament-spool 1.4s linear infinite;
}
.lf-viewer__spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
    border-radius: 50%;
    background: var(--lf-brand);
    box-shadow: 0 0 12px var(--lf-brand);
    animation: lf-filament-pulse 1.4s ease-in-out infinite;
}
@keyframes lf-filament-spool {
    0%   { transform: rotate(0deg)   scale(0.8); border-width: 2px; }
    50%  { transform: rotate(180deg) scale(1);   border-width: 3px; }
    100% { transform: rotate(360deg) scale(0.8); border-width: 2px; }
}
@keyframes lf-filament-pulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.4); opacity: 0.6; }
}

/* ============================================
 * 5. Material chip ripple on selection
 * ============================================ */
.lf-material-list .lf-material-card.is-active {
    position: relative;
    overflow: hidden;
}
.lf-material-list .lf-material-card.is-active::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, var(--lf-brand) 0%, transparent 70%);
    opacity: 0;
    animation: lf-material-ripple 0.6s var(--lf-ease-out);
    pointer-events: none;
}
@keyframes lf-material-ripple {
    0%   { transform: scale(0.5); opacity: 0.4; }
    100% { transform: scale(2.0); opacity: 0; }
}

/* ============================================
 * 6. Price tick - scale-pop on stat changes
 * ============================================ */
[data-stat="time"], [data-stat="weight"] {
    transition: transform 0.2s var(--lf-ease-spring);
    display: inline-block;
}
[data-stat="time"].is-flashing,
[data-stat="weight"].is-flashing {
    animation: lf-stat-pop 0.4s var(--lf-ease-spring);
}
@keyframes lf-stat-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.15); color: var(--lf-brand); }
    100% { transform: scale(1); }
}
.lf-viewer__price.is-updating {
    animation: lf-price-chime 0.5s var(--lf-ease-spring);
}
@keyframes lf-price-chime {
    0%   { transform: scale(1); }
    25%  { transform: scale(1.08) rotate(-1deg); }
    50%  { transform: scale(1.04) rotate(0.5deg); }
    100% { transform: scale(1) rotate(0); }
}

/* ============================================
 * 7. Step progress - active step ring + glow
 * ============================================
 * Progress rail's active step gets a rotating partial ring and a soft
 * pulsing halo. The completed connector lines transition smoothly
 * instead of snapping.
 */
.lf-steps li {
    transition: color 0.4s var(--lf-ease-out);
}
.lf-steps li span {
    position: relative;
    transition: background 0.4s var(--lf-ease-out), color 0.4s var(--lf-ease-out);
}
.lf-steps li.is-active span {
    animation: lf-step-num-glow 2.4s ease-in-out infinite;
}
.lf-steps li.is-active span::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--lf-brand);
    border-right-color: var(--lf-brand);
    opacity: 0.5;
    animation: lf-active-ring 2.4s linear infinite;
    pointer-events: none;
}
@keyframes lf-active-ring {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes lf-step-num-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(45, 140, 255, 0.4); }
    50%      { box-shadow: 0 0 0 8px rgba(45, 140, 255, 0); }
}

/* ============================================
 * 8. Idle next-button glow
 * ============================================
 * After 5s of no interaction with a step that's ready to advance, the
 * Next button gets a soft pulsing glow. JS toggles .is-idle-pulsing.
 */
.lf-btn--primary.is-idle-pulsing {
    animation: lf-btn-attract 2.4s ease-in-out infinite;
}
@keyframes lf-btn-attract {
    0%, 100% { box-shadow: 0 4px 12px rgba(45, 140, 255, 0.25); }
    50%      { box-shadow: 0 4px 24px rgba(45, 140, 255, 0.55), 0 0 0 4px rgba(45, 140, 255, 0.08); }
}

/* ============================================
 * 9. Color swatch satisfying click
 * ============================================ */
.lf-swatches button {
    transition: transform 0.18s var(--lf-ease-spring), box-shadow 0.2s;
}
.lf-swatches button:active {
    transform: scale(0.85);
}
.lf-swatches button.is-active {
    animation: lf-swatch-bounce 0.45s var(--lf-ease-spring);
}
@keyframes lf-swatch-bounce {
    0%   { transform: scale(0.85); }
    50%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}

/* ============================================
 * 10. Step transition: print-fold
 * ============================================
 * Replaces the standard slide-from-right with a 3D rotateY fold-in,
 * like a printed sheet being placed onto the bed.
 */
.lf-step--enter-from-right {
    animation: lf-step-fold-in 0.55s var(--lf-ease-out);
    transform-origin: left center;
}
.lf-step--enter-from-left {
    animation: lf-step-fold-in-left 0.55s var(--lf-ease-out);
    transform-origin: right center;
}
@keyframes lf-step-fold-in {
    0%   { transform: perspective(1000px) rotateY(45deg) translateX(20px); opacity: 0; }
    100% { transform: perspective(1000px) rotateY(0deg)  translateX(0);    opacity: 1; }
}
@keyframes lf-step-fold-in-left {
    0%   { transform: perspective(1000px) rotateY(-45deg) translateX(-20px); opacity: 0; }
    100% { transform: perspective(1000px) rotateY(0deg)   translateX(0);     opacity: 1; }
}

/* ============================================
 * 11. Active file tab "currently being printed" sweep
 * ============================================
 * The tab matching the file in the viewer gets a subtle horizontal
 * sweep - like a print head moving across the bed. Loops on active
 * tabs only.
 */
.lf-file-tab.is-active {
    position: relative;
    overflow: hidden;
}
.lf-file-tab.is-active::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: -40%;
    width: 30%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(45, 140, 255, 0.12) 50%,
        transparent 100%);
    animation: lf-tab-sweep 4.5s ease-in-out infinite;
    pointer-events: none;
}
@keyframes lf-tab-sweep {
    0%, 80% { transform: translateX(0); opacity: 0; }
    85%     { opacity: 1; }
    100%    { transform: translateX(420%); opacity: 0; }
}

/* ============================================
 * 12. Success - quote number stamp on step 5
 * ============================================
 * The quote number on the success screen lands like a printed page
 * being stamped down - large + rotated, settles flat with a spring.
 */
.lf-quote-number {
    animation: lf-stamp 0.7s var(--lf-ease-spring) both;
    display: inline-block;
}
@keyframes lf-stamp {
    0%   { transform: scale(2.5) rotate(-8deg); opacity: 0; }
    60%  { transform: scale(0.95) rotate(2deg); opacity: 1; }
    100% { transform: scale(1) rotate(0);       opacity: 1; }
}

/* ============================================
 * Bonus: viewer placeholder shimmer
 * ============================================ */
.lf-viewer__placeholder:not([hidden]) {
    background: linear-gradient(110deg,
        var(--lf-surface-2) 8%,
        rgba(45, 140, 255, 0.06) 18%,
        var(--lf-surface-2) 33%);
    background-size: 200% 100%;
    animation: lf-placeholder-shimmer 5s linear infinite;
}
@keyframes lf-placeholder-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
 * Suppress all the above when admin disables animations
 * ============================================ */
.lf-quote-widget[data-animations="none"] *,
.lf-quote-widget[data-animations="none"] *::before,
.lf-quote-widget[data-animations="none"] *::after {
    animation: none !important;
}
.lf-quote-widget[data-animations="subtle"] .lf-dropzone.is-idle::before,
.lf-quote-widget[data-animations="subtle"] .lf-file-tab.is-active::before,
.lf-quote-widget[data-animations="subtle"] .lf-viewer__placeholder:not([hidden]),
.lf-quote-widget[data-animations="subtle"] .lf-btn--primary.is-idle-pulsing,
.lf-quote-widget[data-animations="subtle"] .lf-dropzone__icon,
.lf-quote-widget[data-animations="subtle"] .lf-steps li.is-active span {
    animation: none !important;
}

/* =====================================================================
 * Unit-conversion prompt + repair offer (1.13.11)
 * ===================================================================== */
.lf-unit-prompt {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border: 1px solid #BFDBFE;
    border-left: 3px solid #3B82F6;
    border-radius: 8px;
    font-size: 13px;
    color: #1E3A8A;
}
.lf-unit-prompt__head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}
.lf-unit-prompt__icon {
    font-size: 16px;
    line-height: 1.3;
    flex-shrink: 0;
}
.lf-unit-prompt__msg {
    flex: 1;
}
.lf-unit-prompt__preview {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 5px;
    font-size: 12px;
}
.lf-unit-prompt__preview strong {
    font-family: ui-monospace, Menlo, monospace;
    color: #1E3A8A;
    font-weight: 700;
}
.lf-unit-prompt__actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.lf-repair-offer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-left: 3px solid #F59E0B;
    border-radius: 8px;
    font-size: 12px;
    color: #92400E;
    line-height: 1.5;
}
.lf-repair-offer__head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.lf-repair-offer__icon {
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1.3;
}
.lf-repair-offer .lf-btn {
    align-self: flex-start;
    text-decoration: none;
}

/* =====================================================================
 * Customer quote-history dashboard (1.13.13)
 *
 * Card-grid view of all quotes for a customer. Filter chips at top,
 * each card shows thumbnail + status + amount + actions (pay link,
 * documents).
 * ===================================================================== */
.lf-history {
    max-width: 920px;
    margin: 0 auto;
    padding: 16px;
    color: var(--lf-ink);
}
.lf-history__login-gate {
    text-align: center;
    padding: 48px 24px;
    background: var(--lf-surface);
    border: 1px solid var(--lf-line);
    border-radius: 12px;
}
.lf-history__login-gate h3 { margin: 0 0 8px; font-size: 20px; }
.lf-history__lookup-form {
    display: flex;
    gap: 8px;
    max-width: 380px;
    margin: 16px auto 0;
}
.lf-history__lookup-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--lf-line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
}
.lf-history__lookup-form input:focus {
    outline: none;
    border-color: var(--lf-brand);
    box-shadow: 0 0 0 3px rgba(45, 140, 255, 0.12);
}
.lf-history__lookup-form button {
    padding: 10px 18px;
    background: var(--lf-brand);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.lf-history__lookup-form button:hover { background: var(--lf-brand-dark); }
.lf-history__lookup-form button:disabled { opacity: 0.5; cursor: wait; }
.lf-history__lookup-msg {
    text-align: center;
    margin: 12px 0 0;
    font-size: 13px;
}

.lf-history__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.lf-history__head h2 { margin: 0; font-size: 22px; }
.lf-history__stats {
    display: flex;
    gap: 12px;
}
.lf-history__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 14px;
    background: var(--lf-surface-2);
    border: 1px solid var(--lf-line);
    border-radius: 8px;
    min-width: 70px;
}
.lf-history__stat strong {
    font-size: 18px;
    font-family: ui-monospace, Menlo, monospace;
    color: var(--lf-ink);
}
.lf-history__stat span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--lf-muted);
    margin-top: 2px;
}
.lf-history__stat--active strong { color: var(--lf-brand); }

.lf-history__filter {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.lf-history__filter-btn {
    padding: 6px 12px;
    background: var(--lf-surface);
    border: 1px solid var(--lf-line);
    border-radius: 999px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: var(--lf-muted);
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.lf-history__filter-btn:hover {
    border-color: var(--lf-brand);
    color: var(--lf-ink);
}
.lf-history__filter-btn.is-active {
    background: var(--lf-brand);
    color: #fff;
    border-color: var(--lf-brand);
}
.lf-history__filter-count {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.1);
    padding: 1px 6px;
    border-radius: 999px;
}
.lf-history__filter-btn.is-active .lf-history__filter-count {
    background: rgba(255, 255, 255, 0.25);
}

.lf-history__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}
.lf-history__card {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    padding: 12px;
    background: var(--lf-surface);
    border: 1px solid var(--lf-line);
    border-radius: 10px;
    transition: box-shadow 0.15s, transform 0.15s;
}
.lf-history__card:hover {
    box-shadow: 0 4px 12px rgba(11, 14, 20, 0.06);
    transform: translateY(-1px);
}
.lf-history__card-thumb {
    width: 80px;
    height: 80px;
    background: var(--lf-surface-2);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lf-line);
    font-size: 32px;
}
.lf-history__card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.lf-history__card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.lf-history__card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.lf-history__quote-num {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11px;
    background: var(--lf-surface-2);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--lf-ink);
    font-weight: 600;
}
.lf-history__card-meta {
    display: flex;
    gap: 6px;
    font-size: 11px;
    color: var(--lf-muted);
    flex-wrap: wrap;
    align-items: center;
}
.lf-history__card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    flex-wrap: wrap;
    gap: 6px;
}
.lf-history__amount {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 16px;
    color: var(--lf-ink);
}
.lf-history__card-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}
.lf-history__action {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid var(--lf-line);
    color: var(--lf-ink);
    transition: all 0.15s;
}
.lf-history__action--pay {
    background: var(--lf-brand);
    color: #fff;
    border-color: var(--lf-brand);
}
.lf-history__action--pay:hover {
    background: var(--lf-brand-dark);
}
.lf-history__docs {
    position: relative;
}
.lf-history__docs summary {
    list-style: none;
    cursor: pointer;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--lf-line);
    color: var(--lf-ink);
    transition: all 0.15s;
}
.lf-history__docs summary::-webkit-details-marker { display: none; }
.lf-history__docs summary:hover {
    background: var(--lf-surface-2);
    border-color: var(--lf-muted);
}
.lf-history__docs[open] summary {
    background: var(--lf-surface-2);
}
.lf-history__docs-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: var(--lf-surface);
    border: 1px solid var(--lf-line);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(11, 14, 20, 0.1);
    padding: 4px;
    min-width: 140px;
    z-index: 10;
    display: flex;
    flex-direction: column;
}
.lf-history__docs-menu a {
    display: block;
    padding: 6px 10px;
    font-size: 12px;
    color: var(--lf-ink);
    text-decoration: none;
    border-radius: 4px;
    white-space: nowrap;
}
.lf-history__docs-menu a:hover {
    background: var(--lf-surface-2);
}
.lf-history__empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--lf-muted);
    background: var(--lf-surface);
    border: 1px solid var(--lf-line);
    border-radius: 12px;
}

/* Viewer toolbar - active state styling for toggleable controls (1.13.13) */
.lf-viewer__controls button.is-active {
    background: var(--lf-brand);
    color: #fff;
    border-color: var(--lf-brand);
}

/* =====================================================================
 * Upload screen animations - rich progress + idle engagement (1.13.14)
 *
 * Design intent: the upload phase is the longest dead time in the
 * wizard. Customers sit and wait while their file transmits and the
 * server parses it. Every visual element on this screen earns its place
 * by giving them something to look at.
 *
 * Layered animations:
 *   - Drag-over: dropzone scales + magnet pulse, hex glows
 *   - Active upload: filament-style progress bar with glowing extruder
 *     head, drifting spark particles, stage-themed message
 *   - Idle: cycling tips with crossfade, gentle hex breathing
 *
 * All animations honor data-animations="none" / "subtle" via the global
 * suppression rules near the top of this file.
 * ===================================================================== */

/* ============================================
 * Cycling tip - fades in/out as it rotates
 * ============================================ */
.lf-dropzone__tip {
    margin-top: 12px;
    min-height: 18px;
    font-size: 12px;
    color: var(--lf-muted);
    font-style: italic;
    transition: opacity 0.25s ease;
    text-align: center;
    line-height: 1.5;
}

/* ============================================
 * Drag-over magnet effect
 * ============================================
 * When a file is being dragged over the dropzone, scale up slightly,
 * pulse the border, and amplify the hex breathing animation. Feels
 * like the dropzone is "reaching out" to receive the file.
 */
.lf-dropzone.is-dragover {
    transform: scale(1.02);
    border-color: var(--lf-brand);
    background: linear-gradient(135deg,
        rgba(45, 140, 255, 0.06) 0%,
        rgba(45, 140, 255, 0.12) 100%);
    box-shadow:
        0 0 0 4px rgba(45, 140, 255, 0.1),
        0 8px 24px rgba(45, 140, 255, 0.18);
    transition: transform 0.2s var(--lf-ease-spring), box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.lf-dropzone.is-dragover .lf-dropzone__icon {
    animation: lf-hex-magnet 1s ease-in-out infinite;
    color: var(--lf-brand);
}
@keyframes lf-hex-magnet {
    0%, 100% {
        transform: scale(1.1) translateY(0);
        filter: drop-shadow(0 0 8px rgba(45, 140, 255, 0.4));
    }
    50% {
        transform: scale(1.18) translateY(-3px);
        filter: drop-shadow(0 0 16px rgba(45, 140, 255, 0.65));
    }
}

/* ============================================
 * Spark particle layer during active uploads
 * ============================================
 * 8 small dots positioned with random offsets, each animating upward
 * with a fade trail. Only visible while the dropzone has an active
 * upload underway. Particles loop at staggered delays so the effect
 * is continuous instead of pulsing all-at-once.
 */
.lf-dropzone__sparks {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}
.lf-dropzone.is-uploading .lf-dropzone__sparks {
    opacity: 1;
}
.lf-dropzone__sparks span {
    position: absolute;
    bottom: -10px;
    width: 4px;
    height: 4px;
    background: var(--lf-brand);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--lf-brand);
    animation: lf-spark-rise 4s linear infinite;
    opacity: 0;
}
/* Stagger each particle's start position and timing so the effect
   never bunches. Eight dots covering the dropzone width. */
.lf-dropzone__sparks span:nth-child(1) { left: 8%;  animation-delay: 0s;   animation-duration: 3.8s; }
.lf-dropzone__sparks span:nth-child(2) { left: 22%; animation-delay: 0.6s; animation-duration: 4.5s; }
.lf-dropzone__sparks span:nth-child(3) { left: 36%; animation-delay: 1.2s; animation-duration: 3.2s; }
.lf-dropzone__sparks span:nth-child(4) { left: 48%; animation-delay: 0.3s; animation-duration: 4.1s; }
.lf-dropzone__sparks span:nth-child(5) { left: 60%; animation-delay: 1.8s; animation-duration: 3.6s; }
.lf-dropzone__sparks span:nth-child(6) { left: 72%; animation-delay: 0.9s; animation-duration: 4.3s; }
.lf-dropzone__sparks span:nth-child(7) { left: 84%; animation-delay: 1.5s; animation-duration: 3.9s; }
.lf-dropzone__sparks span:nth-child(8) { left: 92%; animation-delay: 2.1s; animation-duration: 4.7s; }
@keyframes lf-spark-rise {
    0% {
        bottom: -10px;
        opacity: 0;
        transform: translateX(0) scale(0.5);
    }
    10% {
        opacity: 0.9;
        transform: translateX(0) scale(1);
    }
    50% {
        transform: translateX(8px) scale(1);
    }
    90% {
        opacity: 0.7;
        transform: translateX(-6px) scale(0.8);
    }
    100% {
        bottom: 100%;
        opacity: 0;
        transform: translateX(0) scale(0.3);
    }
}

/* ============================================
 * Rich upload progress block
 * ============================================
 * Replaces the old inline bar with a multi-element block: header row
 * with stage message + percentage, the bar itself with a glowing
 * extruder head, and a footer showing live byte counter.
 */
.lf-uploads__progress {
    grid-column: 1 / -1; /* span full width of the upload list item grid */
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}
.lf-uploads__progress-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 11px;
    font-weight: 600;
}
.lf-uploads__stage {
    color: var(--lf-ink);
    transition: color 0.3s;
    /* Subtle text-fade animation so the stage text reads as live
       even without movement. */
    animation: lf-stage-pulse 2.4s ease-in-out infinite;
}
@keyframes lf-stage-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.7; }
}
.lf-uploads__pct {
    font-family: ui-monospace, Menlo, monospace;
    color: var(--lf-brand);
    font-size: 12px;
    font-weight: 700;
    transition: transform 0.2s var(--lf-ease-spring);
}
.lf-uploads__progress-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: var(--lf-muted);
    font-family: ui-monospace, Menlo, monospace;
    min-height: 12px;
}

/* ============================================
 * Filament-style progress bar with glowing extruder
 * ============================================
 * Bigger than the old bar (height 8px vs 4px), with a leading-edge
 * "extruder head" — a slightly taller round dot with a glow. Looks
 * like filament being extruded along the print path.
 */
.lf-uploads__bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: var(--lf-surface-2);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--lf-line);
}
.lf-uploads__bar > span {
    position: relative;
    display: block;
    height: 100%;
    background: linear-gradient(90deg,
        var(--lf-brand) 0%,
        var(--lf-brand-dark) 100%);
    border-radius: inherit;
    transition: width 0.3s ease-out;
    overflow: visible;
    /* Subtle moving stripes inside the filled portion - reads as
       "material flowing through" the bar. */
    background-image:
        linear-gradient(90deg, var(--lf-brand) 0%, var(--lf-brand-dark) 100%),
        repeating-linear-gradient(
            -45deg,
            rgba(255, 255, 255, 0.15) 0,
            rgba(255, 255, 255, 0.15) 6px,
            transparent 6px,
            transparent 12px
        );
    background-size: 100% 100%, 24px 100%;
    animation: lf-bar-stripes 1.2s linear infinite;
}
@keyframes lf-bar-stripes {
    0%   { background-position: 0 0, 0 0; }
    100% { background-position: 0 0, 24px 0; }
}
.lf-uploads__bar-head {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--lf-brand);
    border-radius: 50%;
    box-shadow:
        0 0 8px var(--lf-brand),
        0 0 16px rgba(45, 140, 255, 0.4);
    animation: lf-extruder-pulse 0.8s ease-in-out infinite;
}
@keyframes lf-extruder-pulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 8px var(--lf-brand), 0 0 16px rgba(45, 140, 255, 0.4);
    }
    50% {
        transform: translateY(-50%) scale(1.3);
        box-shadow: 0 0 14px var(--lf-brand), 0 0 24px rgba(45, 140, 255, 0.7);
    }
}

/* ============================================
 * Stage-specific color and intensity shifts
 * ============================================
 * The progress block carries data-stage="..." and we tune the glow
 * color/intensity per stage so the visual energy ramps up as the
 * upload nears completion. Subtle but recognizable.
 */
.lf-uploads__progress[data-stage="finalizing"] .lf-uploads__bar-head {
    animation-duration: 0.5s;
    box-shadow:
        0 0 12px var(--lf-brand),
        0 0 24px rgba(45, 140, 255, 0.6);
}
.lf-uploads__progress[data-stage="analyzing"] .lf-uploads__bar > span,
.lf-uploads__progress[data-stage="computing"] .lf-uploads__bar > span,
.lf-uploads__progress[data-stage="counting"] .lf-uploads__bar > span,
.lf-uploads__progress[data-stage="finishing"] .lf-uploads__bar > span {
    background: linear-gradient(90deg, #059669 0%, #10b981 100%);
    background-image:
        linear-gradient(90deg, #059669 0%, #10b981 100%),
        repeating-linear-gradient(
            -45deg,
            rgba(255, 255, 255, 0.2) 0,
            rgba(255, 255, 255, 0.2) 6px,
            transparent 6px,
            transparent 12px
        );
}
.lf-uploads__progress[data-stage="analyzing"] .lf-uploads__bar-head,
.lf-uploads__progress[data-stage="computing"] .lf-uploads__bar-head,
.lf-uploads__progress[data-stage="counting"] .lf-uploads__bar-head,
.lf-uploads__progress[data-stage="finishing"] .lf-uploads__bar-head {
    background: #10b981;
    box-shadow:
        0 0 10px #10b981,
        0 0 20px rgba(16, 185, 129, 0.5);
    animation-duration: 0.6s;
}
.lf-uploads__progress[data-stage="analyzing"] .lf-uploads__pct,
.lf-uploads__progress[data-stage="computing"] .lf-uploads__pct,
.lf-uploads__progress[data-stage="counting"] .lf-uploads__pct,
.lf-uploads__progress[data-stage="finishing"] .lf-uploads__pct {
    color: #059669;
}

/* Bytes counter gets a brief flash when its value updates - JS doesn't
   need to do anything; the transition catches the textContent change. */
.lf-uploads__bytes {
    transition: color 0.15s;
}

/* Adjust upload list item to accommodate the wider progress block.
   Original layout was a single-row grid; with the progress span we
   need it to wrap. */
.lf-uploads li.is-uploading {
    grid-template-columns: 1fr auto auto;
    align-items: start;
}

/* ============================================
 * Suppress for animations="none" / "subtle"
 * ============================================ */
.lf-quote-widget[data-animations="none"] .lf-dropzone__sparks,
.lf-quote-widget[data-animations="none"] .lf-uploads__bar > span,
.lf-quote-widget[data-animations="none"] .lf-uploads__bar-head,
.lf-quote-widget[data-animations="none"] .lf-uploads__stage,
.lf-quote-widget[data-animations="none"] .lf-dropzone.is-dragover .lf-dropzone__icon {
    animation: none !important;
}
.lf-quote-widget[data-animations="subtle"] .lf-dropzone__sparks {
    display: none;
}
.lf-quote-widget[data-animations="subtle"] .lf-uploads__stage {
    animation: none;
}

/* =====================================================================
 * DFM "Print readiness" panel (1.13.15)
 *
 * Single readable surface aggregating overhang detection, smallest-
 * feature, fit-against-bed, and mesh-quality checks. Color-coded by
 * verdict (green/yellow/red) so the customer can read it at a glance,
 * with a details disclosure for per-check breakdowns.
 * ===================================================================== */
.lf-dfm {
    border: 1px solid var(--lf-line);
    border-radius: 10px;
    padding: 12px 14px;
    background: var(--lf-surface);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.lf-dfm--green {
    border-color: #BBF7D0;
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
}
.lf-dfm--yellow {
    border-color: #FDE68A;
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
}
.lf-dfm--red {
    border-color: #FECACA;
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
}

.lf-dfm__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.lf-dfm__verdict {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.lf-dfm__verdict-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    color: #fff;
}
.lf-dfm--green .lf-dfm__verdict-icon  { background: #16A34A; }
.lf-dfm--yellow .lf-dfm__verdict-icon { background: #D97706; }
.lf-dfm--red .lf-dfm__verdict-icon    { background: #DC2626; }

.lf-dfm__verdict-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.lf-dfm__verdict-text strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--lf-ink);
    line-height: 1.3;
}
.lf-dfm__verdict-text span {
    font-size: 12px;
    color: var(--lf-muted);
    line-height: 1.4;
}

.lf-dfm__score {
    text-align: right;
    flex-shrink: 0;
    font-family: ui-monospace, Menlo, monospace;
}
.lf-dfm__score strong {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}
.lf-dfm--green .lf-dfm__score strong  { color: #16A34A; }
.lf-dfm--yellow .lf-dfm__score strong { color: #D97706; }
.lf-dfm--red .lf-dfm__score strong    { color: #DC2626; }
.lf-dfm__score span {
    font-size: 11px;
    color: var(--lf-muted);
    margin-left: 2px;
}

.lf-dfm__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.lf-dfm__stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    font-size: 11px;
    color: var(--lf-ink);
    font-family: ui-monospace, Menlo, monospace;
}
.lf-dfm__stats strong {
    font-weight: 700;
    color: var(--lf-ink);
}

.lf-dfm__details {
    margin: 0;
}
.lf-dfm__details > summary {
    list-style: none;
    cursor: pointer;
    padding: 6px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--lf-ink);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.lf-dfm__details > summary::-webkit-details-marker { display: none; }
.lf-dfm__details > summary::before {
    content: '▸';
    font-size: 10px;
    transition: transform 0.15s;
}
.lf-dfm__details[open] > summary::before {
    transform: rotate(90deg);
}
.lf-dfm__details > summary:hover {
    color: var(--lf-brand);
}

.lf-dfm__checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 6px;
}
.lf-dfm-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
}
.lf-dfm-check--high   { border-left: 3px solid #DC2626; }
.lf-dfm-check--medium { border-left: 3px solid #D97706; }
.lf-dfm-check--low    { border-left: 3px solid #2563EB; }

.lf-dfm-check__icon {
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1.4;
}
.lf-dfm-check__body {
    flex: 1;
    min-width: 0;
}
.lf-dfm-check__body strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--lf-ink);
    line-height: 1.4;
    margin-bottom: 2px;
}
.lf-dfm-check__body p {
    margin: 0;
    font-size: 11px;
    color: var(--lf-muted);
    line-height: 1.5;
}

/* Suppress for animations="none" - no animations on this panel anyway,
   but the verdict-icon could pulse. We don't actually animate it
   currently; placeholder for future enhancement. */

/* =====================================================================
 * Magic-link login form (1.13.17)
 *
 * Used by the [3dprint_login] shortcode. Compact, focused, minimal -
 * the customer should be able to scan and act in under five seconds.
 * ===================================================================== */
.lf-login {
    max-width: 420px;
    margin: 0 auto;
    padding: 24px;
    background: var(--lf-surface);
    border: 1px solid var(--lf-line);
    border-radius: 12px;
    color: var(--lf-ink);
}
.lf-login h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 600;
}
.lf-login__subtitle {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--lf-muted);
    line-height: 1.5;
}
.lf-login__form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.lf-login__form input[type="email"] {
    padding: 10px 14px;
    border: 1.5px solid var(--lf-line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}
.lf-login__form input[type="email"]:focus {
    outline: none;
    border-color: var(--lf-brand);
    box-shadow: 0 0 0 3px rgba(45, 140, 255, 0.12);
}
.lf-login__form button {
    padding: 10px 16px;
    background: var(--lf-brand);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.lf-login__form button:hover {
    background: var(--lf-brand-dark);
}
.lf-login__form button:disabled {
    opacity: 0.5;
    cursor: wait;
}
.lf-login__msg {
    margin: 12px 0 0;
    padding: 10px 14px;
    background: var(--lf-surface-2);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}
.lf-login__error {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #FEF2F2;
    border-left: 3px solid #DC2626;
    border-radius: 6px;
    font-size: 13px;
    color: #991B1B;
    line-height: 1.5;
}
.lf-login__hint {
    margin: 12px 0 0;
    font-size: 11px;
    color: var(--lf-muted);
    text-align: center;
}
.lf-login--signed-in {
    text-align: center;
}
.lf-login--signed-in p {
    margin: 8px 0;
}

/* =====================================================================
 * Portal style preset (1.13.18)
 *
 * An alternate visual treatment for the [3dprint_quote] wizard that
 * matches the aesthetic of the LayerForge Tickets plugin's portal
 * page - glassmorphism panels, gradient backgrounds, animated entry,
 * icon tiles for selectors, underline-style text inputs, big gradient
 * submit button.
 *
 * Activated when admin picks Settings -> Appearance -> Wizard style:
 * Portal. Everything is scoped under [data-wizard-style="portal"] so
 * existing Classic-styled installs aren't affected.
 *
 * Variables defined here override the theme tokens for portal-styled
 * widgets only, so the chosen color scheme still influences accents
 * via the gradient endpoints.
 * ===================================================================== */

.lf-quote-widget[data-wizard-style="portal"] {
    --lf-portal-accent: #6366f1;
    --lf-portal-accent-2: #ec4899;
    --lf-portal-bg: rgba(50, 55, 75, 0.85);
    --lf-portal-bg-strong: rgba(30, 35, 55, 0.95);
    --lf-portal-border: rgba(255, 255, 255, 0.08);
    --lf-portal-text: #f1f5f9;
    --lf-portal-muted: rgba(241, 245, 249, 0.65);
    --lf-portal-input-bg: rgba(255, 255, 255, 0.04);
    --lf-portal-radius: 18px;
    --lf-portal-shadow: 0 28px 80px -20px rgba(0, 0, 0, 0.5);

    position: relative;
    background: linear-gradient(135deg, #5b5575 0%, #6b5d8a 50%, #5b6190 100%);
    border-radius: var(--lf-portal-radius);
    box-shadow: var(--lf-portal-shadow);
    color: var(--lf-portal-text);
    padding: 36px 28px;
    overflow: hidden;
    animation: lf-portal-enter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Soft radial glow in the background, kept subtle so content stays readable. */
.lf-quote-widget[data-wizard-style="portal"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 30%, rgba(99, 102, 241, 0.25) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(236, 72, 153, 0.18) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.lf-quote-widget[data-wizard-style="portal"] > * {
    position: relative;
    z-index: 1;
}

@keyframes lf-portal-enter {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* Step rail - portal variant uses pill-style segments with gradient
   fill on the active step. */
.lf-quote-widget[data-wizard-style="portal"] .lf-steps {
    background: transparent;
    border: 0;
    padding: 0;
    margin-bottom: 24px;
    gap: 6px;
}
.lf-quote-widget[data-wizard-style="portal"] .lf-steps li {
    background: var(--lf-portal-input-bg);
    border: 1px solid var(--lf-portal-border);
    border-radius: 999px;
    padding: 6px 14px;
    color: var(--lf-portal-muted);
    font-weight: 500;
}
.lf-quote-widget[data-wizard-style="portal"] .lf-steps li.is-active {
    background: linear-gradient(90deg, var(--lf-portal-accent), var(--lf-portal-accent-2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 20px -8px rgba(236, 72, 153, 0.6);
}
.lf-quote-widget[data-wizard-style="portal"] .lf-steps li.is-done {
    color: var(--lf-portal-text);
    border-color: rgba(255, 255, 255, 0.18);
}
.lf-quote-widget[data-wizard-style="portal"] .lf-steps li span {
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
}
.lf-quote-widget[data-wizard-style="portal"] .lf-steps li.is-active span {
    background: rgba(255, 255, 255, 0.25);
}

/* Step panel titles - the bold gradient-text "How can we help" treatment. */
.lf-quote-widget[data-wizard-style="portal"] .lf-step-title,
.lf-quote-widget[data-wizard-style="portal"] [data-step-panel] > h2:first-child {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(90deg, var(--lf-portal-accent), var(--lf-portal-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin: 8px 0 6px;
}
.lf-quote-widget[data-wizard-style="portal"] .lf-step-subtitle {
    text-align: center;
    color: var(--lf-portal-muted);
    font-size: 14px;
    margin: 0 0 24px;
}

/* Dropzone - bigger, with the subtle blue glow ring inside. */
.lf-quote-widget[data-wizard-style="portal"] .lf-dropzone {
    background: var(--lf-portal-input-bg);
    border: 2px dashed rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 48px 24px;
    position: relative;
    transition: all 0.3s;
}
.lf-quote-widget[data-wizard-style="portal"] .lf-dropzone::after {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 10px;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.35) 0%, transparent 65%);
    pointer-events: none;
    opacity: 0.6;
}
.lf-quote-widget[data-wizard-style="portal"] .lf-dropzone__icon,
.lf-quote-widget[data-wizard-style="portal"] .lf-icon-upload {
    color: var(--lf-portal-accent);
    width: 48px;
    height: 48px;
}
.lf-quote-widget[data-wizard-style="portal"] .lf-dropzone__title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}
.lf-quote-widget[data-wizard-style="portal"] .lf-dropzone__title button[data-lf-browse] {
    background: transparent;
    color: var(--lf-portal-accent-2);
    border: 0;
    padding: 0;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}
.lf-quote-widget[data-wizard-style="portal"] .lf-dropzone__meta,
.lf-quote-widget[data-wizard-style="portal"] .lf-dropzone__tip {
    color: var(--lf-portal-muted);
}
.lf-quote-widget[data-wizard-style="portal"] .lf-dropzone.is-dragover {
    border-color: var(--lf-portal-accent);
    background: rgba(99, 102, 241, 0.12);
    transform: scale(1.01);
}

/* Inputs - underline-style instead of bordered boxes. */
.lf-quote-widget[data-wizard-style="portal"] input[type="text"],
.lf-quote-widget[data-wizard-style="portal"] input[type="email"],
.lf-quote-widget[data-wizard-style="portal"] input[type="tel"],
.lf-quote-widget[data-wizard-style="portal"] input[type="number"],
.lf-quote-widget[data-wizard-style="portal"] input[type="url"],
.lf-quote-widget[data-wizard-style="portal"] textarea,
.lf-quote-widget[data-wizard-style="portal"] select {
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    padding: 10px 0;
    color: #fff;
    font-size: 15px;
    width: 100%;
    transition: border-color 0.2s;
}
.lf-quote-widget[data-wizard-style="portal"] input::placeholder,
.lf-quote-widget[data-wizard-style="portal"] textarea::placeholder {
    color: var(--lf-portal-muted);
}
.lf-quote-widget[data-wizard-style="portal"] input:focus,
.lf-quote-widget[data-wizard-style="portal"] textarea:focus,
.lf-quote-widget[data-wizard-style="portal"] select:focus {
    outline: 0;
    border-bottom-color: var(--lf-portal-accent);
    box-shadow: none;
}
.lf-quote-widget[data-wizard-style="portal"] label {
    color: var(--lf-portal-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.lf-quote-widget[data-wizard-style="portal"] textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px;
    min-height: 140px;
    font-family: inherit;
}

/* Cards (per-part config, summary, etc) - glass panels. */
.lf-quote-widget[data-wizard-style="portal"] .lf-card,
.lf-quote-widget[data-wizard-style="portal"] .lf-config__card,
.lf-quote-widget[data-wizard-style="portal"] .lf-summary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--lf-portal-border);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--lf-portal-text);
}

/* Buttons - primary is the big gradient, ghost is glass. */
.lf-quote-widget[data-wizard-style="portal"] .lf-btn,
.lf-quote-widget[data-wizard-style="portal"] button[data-lf-next],
.lf-quote-widget[data-wizard-style="portal"] button[data-lf-submit] {
    border-radius: 999px;
    padding: 14px 28px;
    font-weight: 700;
    font-size: 15px;
    border: 0;
    cursor: pointer;
    transition: all 0.2s;
}
.lf-quote-widget[data-wizard-style="portal"] .lf-btn--primary,
.lf-quote-widget[data-wizard-style="portal"] button[data-lf-next],
.lf-quote-widget[data-wizard-style="portal"] button[data-lf-submit] {
    background: linear-gradient(90deg, var(--lf-portal-accent), var(--lf-portal-accent-2));
    color: #fff;
    box-shadow: 0 12px 30px -10px rgba(99, 102, 241, 0.5);
}
.lf-quote-widget[data-wizard-style="portal"] .lf-btn--primary:hover,
.lf-quote-widget[data-wizard-style="portal"] button[data-lf-next]:hover,
.lf-quote-widget[data-wizard-style="portal"] button[data-lf-submit]:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px -10px rgba(236, 72, 153, 0.55);
}
.lf-quote-widget[data-wizard-style="portal"] .lf-btn--ghost,
.lf-quote-widget[data-wizard-style="portal"] button[data-lf-prev] {
    background: rgba(255, 255, 255, 0.08);
    color: var(--lf-portal-text);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.lf-quote-widget[data-wizard-style="portal"] .lf-btn--ghost:hover,
.lf-quote-widget[data-wizard-style="portal"] button[data-lf-prev]:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* Color/material/finish swatches - portal turns them into glass tiles. */
.lf-quote-widget[data-wizard-style="portal"] .lf-swatch,
.lf-quote-widget[data-wizard-style="portal"] .lf-material-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--lf-portal-border);
    border-radius: 12px;
}
.lf-quote-widget[data-wizard-style="portal"] .lf-swatch.is-active,
.lf-quote-widget[data-wizard-style="portal"] .lf-material-card.is-active {
    border-color: var(--lf-portal-accent);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 0 0 1px var(--lf-portal-accent), 0 8px 20px -8px rgba(99, 102, 241, 0.4);
}

/* Upload list items - glassy rows with brighter accents. */
.lf-quote-widget[data-wizard-style="portal"] .lf-uploads li {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--lf-portal-border);
    border-radius: 10px;
    color: var(--lf-portal-text);
}
.lf-quote-widget[data-wizard-style="portal"] .lf-uploads__meta {
    color: var(--lf-portal-muted);
}
.lf-quote-widget[data-wizard-style="portal"] .lf-uploads__bar {
    background: rgba(255, 255, 255, 0.06);
    border-color: transparent;
}
.lf-quote-widget[data-wizard-style="portal"] .lf-uploads__bar > span {
    background: linear-gradient(90deg, var(--lf-portal-accent), var(--lf-portal-accent-2));
    background-image: linear-gradient(90deg, var(--lf-portal-accent), var(--lf-portal-accent-2)),
        repeating-linear-gradient(-45deg, rgba(255,255,255,0.18) 0, rgba(255,255,255,0.18) 6px, transparent 6px, transparent 12px);
}
.lf-quote-widget[data-wizard-style="portal"] .lf-uploads__bar-head {
    background: var(--lf-portal-accent-2);
    box-shadow: 0 0 10px var(--lf-portal-accent-2), 0 0 20px rgba(236, 72, 153, 0.5);
}

/* DFM panel - keep verdict semantics but harmonize with portal palette. */
.lf-quote-widget[data-wizard-style="portal"] .lf-dfm {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--lf-portal-border);
    color: var(--lf-portal-text);
}
.lf-quote-widget[data-wizard-style="portal"] .lf-dfm__verdict-text strong {
    color: #fff;
}
.lf-quote-widget[data-wizard-style="portal"] .lf-dfm__verdict-text span,
.lf-quote-widget[data-wizard-style="portal"] .lf-dfm__score span {
    color: var(--lf-portal-muted);
}
.lf-quote-widget[data-wizard-style="portal"] .lf-dfm__stats span {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.lf-quote-widget[data-wizard-style="portal"] .lf-dfm__details > summary {
    color: var(--lf-portal-text);
}

/* Warnings / unit prompt / repair offer - dial them into the dark theme. */
.lf-quote-widget[data-wizard-style="portal"] .lf-warning,
.lf-quote-widget[data-wizard-style="portal"] .lf-unit-prompt,
.lf-quote-widget[data-wizard-style="portal"] .lf-repair-offer {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--lf-portal-text);
}
.lf-quote-widget[data-wizard-style="portal"] .lf-unit-prompt__preview {
    background: rgba(0, 0, 0, 0.2);
}
.lf-quote-widget[data-wizard-style="portal"] .lf-unit-prompt__preview strong {
    color: #fff;
}

/* Tracker-style timeline (used inside the Done step) - portal version
   uses gradient progress fill. */
.lf-quote-widget[data-wizard-style="portal"] .lf-timeline li::before {
    background: rgba(255, 255, 255, 0.15);
}
.lf-quote-widget[data-wizard-style="portal"] .lf-timeline li.is-done::before {
    background: linear-gradient(90deg, var(--lf-portal-accent), var(--lf-portal-accent-2));
}
