/* procomp.lt/partpicker — the chassis view.
 *
 * One memorable element: a side view of the case that fills up as parts are
 * chosen. Everything else on the page stays plain Tailwind.
 */
.pp-rig {
    --pp-chassis: #0f172a;
    --pp-panel: #1e293b;
    --pp-line: #334155;
    --pp-empty: #475569;
    --pp-part: #cbd5e1;
    --pp-led: #22c55e;
    --pp-warn: #f59e0b;
    --pp-error: #ef4444;
}

.pp-rig svg { display: block; width: 100%; height: auto; }

/* Empty places are drawn as dashed outlines inviting a click. */
.pp-zone { cursor: pointer; outline: none; }
.pp-zone .pp-slot {
    fill: transparent;
    stroke: var(--pp-empty);
    stroke-width: 1.5;
    stroke-dasharray: 5 4;
    transition: stroke .2s, fill .2s;
}
.pp-zone .pp-plus { fill: var(--pp-empty); font: 600 11px system-ui, sans-serif; transition: fill .2s; }
.pp-zone:hover .pp-slot,
.pp-zone:focus-visible .pp-slot { stroke: var(--pp-led); fill: rgba(34, 197, 94, .08); }
.pp-zone:hover .pp-plus,
.pp-zone:focus-visible .pp-plus { fill: var(--pp-led); }
.pp-zone:focus-visible .pp-slot { stroke-width: 2.5; }
.pp-zone.is-on:hover .pp-body,
.pp-zone.is-on:focus-visible .pp-body { stroke: var(--pp-led); stroke-width: 2.5; }

/* A chosen part: solid body, hidden placeholder. */
.pp-part { opacity: 0; transform-box: fill-box; transform-origin: center; pointer-events: none; }
.pp-zone.is-on .pp-part { opacity: 1; }
.pp-zone.is-on .pp-slot,
.pp-zone.is-on .pp-plus { opacity: 0; }
.pp-body { fill: var(--pp-panel); stroke: var(--pp-part); stroke-width: 1.5; }
.pp-detail { fill: none; stroke: var(--pp-line); stroke-width: 1; }
.pp-chip { fill: #64748b; }
.pp-lit { fill: var(--pp-led); opacity: .35; transition: opacity .3s; }
.pp-rig.is-live .pp-lit { opacity: 1; }

/* Problems show on the part itself. */
.pp-zone.is-error .pp-body,
.pp-zone.is-error .pp-slot { stroke: var(--pp-error); stroke-width: 2.5; }
.pp-zone.is-warning .pp-body { stroke: var(--pp-warn); stroke-width: 2; }

/* The part a person just picked snaps into place. */
@keyframes pp-snap {
    0% { opacity: 0; transform: translateY(-14px) scale(.96); }
    70% { opacity: 1; transform: translateY(2px) scale(1.01); }
    100% { opacity: 1; transform: none; }
}
.pp-zone.is-new .pp-part {
    animation: pp-snap .42s cubic-bezier(.2, .9, .3, 1.2) both;
    animation-delay: var(--pp-delay, 0s);
}

/* Fans turn once the machine is complete and compatible. */
.pp-fan { transform-box: fill-box; transform-origin: center; }
@keyframes pp-spin { to { transform: rotate(360deg); } }
.pp-rig.is-live .pp-fan { animation: pp-spin 1.1s linear infinite; }

/* Power-on moment: LEDs come on in sequence. */
@keyframes pp-boot { 0% { opacity: .2; } 40% { opacity: 1; } 55% { opacity: .5; } 100% { opacity: 1; } }
.pp-rig.is-booting .pp-lit { animation: pp-boot .9s ease-out both; }
.pp-rig.is-booting .pp-lit:nth-of-type(2n) { animation-delay: .12s; }
.pp-rig.is-booting .pp-lit:nth-of-type(3n) { animation-delay: .24s; }

.pp-power-led { fill: #334155; transition: fill .3s; }
.pp-rig.is-live .pp-power-led { fill: var(--pp-led); filter: drop-shadow(0 0 3px var(--pp-led)); }

/* Glass side panel once a case is chosen. */
.pp-glass { fill: rgba(148, 163, 184, .06); stroke: #64748b; stroke-width: 2; }
.pp-rig.has-case .pp-glass { fill: rgba(56, 189, 248, .05); stroke: var(--pp-part); }

/* Power meter under the rig. */
.pp-meter { height: 10px; border-radius: 5px; background: #e2e8f0; position: relative; overflow: visible; }
.pp-meter-fill { height: 100%; border-radius: 5px; background: #22c55e; transition: width .5s ease, background-color .3s; }
.pp-meter-fill.is-warning { background: #f59e0b; }
.pp-meter-fill.is-error { background: #ef4444; }
.pp-meter-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #0f172a; border-radius: 1px; }

/* Progress: one segment per required part. */
.pp-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.pp-step { height: 6px; border-radius: 3px; background: #e2e8f0; transition: background-color .3s; }
.pp-step.is-on { background: #22c55e; }
.pp-step.is-error { background: #ef4444; }
.pp-step.is-warning { background: #f59e0b; }

/* "Ask AI": the one place the page uses a second colour. */
.pp-ai-button { background: linear-gradient(90deg, #7c3aed, #16a34a); }
.pp-ai-button:hover { filter: brightness(1.08); }
@keyframes pp-wand { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-18deg); } 75% { transform: rotate(14deg); } }
.pp-wand-busy { animation: pp-wand .7s ease-in-out infinite; transform-origin: 20% 80%; }

@media (prefers-reduced-motion: reduce) {
    .pp-wand-busy { animation: none; }
    .pp-zone.is-new .pp-part,
    .pp-rig.is-live .pp-fan,
    .pp-rig.is-booting .pp-lit { animation: none; }
    .pp-meter-fill, .pp-step, .pp-zone .pp-slot { transition: none; }
}

/* Share buttons: brand colours, 36 px round targets. */
.pp-share { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
            border-radius: 9999px; color: #fff; transition: filter .15s; }
.pp-share:hover, .pp-share:focus-visible { filter: brightness(1.1); }
.pp-share svg { width: 18px; height: 18px; }
.pp-share-facebook { background: #1877f2; }
.pp-share-whatsapp { background: #25d366; }
.pp-share-telegram { background: #229ed9; }
.pp-share-viber { background: #7360f2; }
.pp-share-email { background: #6b7280; }


/* ---------- The builder: one build list, one picker dialog, one type scale ----------
 * Every part appears once (the list); the side panel holds only the total, checks and
 * actions. Titles 15 px, labels 12 px, prices 17-18 px, buttons 40 px (44 px on phones). */
.pp-builder {
    --pp-ink: #0f172a; --pp-text: #334155; --pp-muted: #64748b;
    --pp-border: #e2e8f0; --pp-border-strong: #cbd5e1;
    --pp-action: #059669; --pp-action-dark: #047857; --pp-action-soft: #ecfdf5; --pp-action-tint: #d1fae5;
    --pp-warn-text: #92400e; --pp-warn-soft: #fffbeb; --pp-error-text: #b91c1c; --pp-error-soft: #fef2f2;
}
.pp-builder button:focus-visible, .pp-builder summary:focus-visible, .pp-builder a:focus-visible { outline: 2px solid #047857; outline-offset: 2px; }
.pp-workspace-main, .pp-workspace aside { min-width: 0; }
.pp-workspace-main:focus { outline: none; }

/* Buttons */
.pp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px;
          border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 600; line-height: 1.25;
          white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s, transform .1s; }
.pp-btn:active:not(:disabled) { transform: scale(.97); }
.pp-btn:disabled { opacity: .5; cursor: default; }
.pp-btn.is-wide { width: 100%; min-height: 46px; white-space: normal; }
.pp-btn-primary { background: var(--pp-action); color: #fff; }
.pp-btn-primary:hover:not(:disabled) { background: var(--pp-action-dark); }
.pp-btn-outline { border-color: var(--pp-border-strong); background: #fff; color: var(--pp-text); }
.pp-btn-outline:hover:not(:disabled) { border-color: var(--pp-action); color: var(--pp-action-dark); }
.pp-btn-outline.is-3d { border-color: #ddd6fe; background: #f5f3ff; color: #6d28d9; }
.pp-btn-quiet { padding-inline: 10px; color: var(--pp-action-dark); }
.pp-btn-quiet:hover:not(:disabled) { background: var(--pp-action-soft); }
.pp-btn-danger { border-color: #fca5a5; background: #fff; color: var(--pp-error-text); }
.pp-btn-danger:hover:not(:disabled) { background: var(--pp-error-soft); }
.pp-btn-icon { width: 40px; padding: 0; color: var(--pp-muted); }
.pp-btn-icon:hover:not(:disabled) { background: var(--pp-error-soft); color: var(--pp-error-text); }
.pp-btn-icon svg { width: 18px; height: 18px; }
.pp-text-button { min-height: 44px; padding: 8px 0; text-align: left; font-size: 13px; font-weight: 600; color: var(--pp-action-dark); text-decoration: underline; text-underline-offset: 3px; }
.pp-link { font-size: 13px; color: var(--pp-action-dark); text-decoration: underline; text-underline-offset: 2px; }
.pp-check { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; cursor: pointer; }
.pp-check input { width: 16px; height: 16px; border-radius: 4px; accent-color: var(--pp-action); }

/* First visit: what is it for? */
.pp-start { margin-top: 24px; padding: 24px; border: 1px solid var(--pp-border-strong); border-radius: 16px; background: #fff; }
.pp-start-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pp-start h2 { margin: 0; color: var(--pp-ink); font-size: 20px; line-height: 1.4; font-weight: 700; }
.pp-start p { margin-top: 4px; color: var(--pp-muted); font-size: 14px; line-height: 1.5; max-width: 65ch; }
.pp-start-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 20px; gap: 12px; }
.pp-start-options > button { display: flex; align-items: center; gap: 14px; min-height: 96px; padding: 18px; text-align: left; border: 1px solid var(--pp-border-strong); border-radius: 14px; color: var(--pp-ink); background: #f8fafc; transition: border-color .15s, background-color .15s, transform .15s, box-shadow .15s; }
.pp-start-options > button:hover, .pp-start-options > button[aria-pressed="true"] { border-color: var(--pp-action); background: var(--pp-action-soft); transform: translateY(-2px); box-shadow: 0 8px 20px -14px rgba(4, 120, 87, .6); }
.pp-start-options svg { width: 44px; height: 44px; flex: 0 0 44px; padding: 6px; border-radius: 12px; background: var(--pp-action-tint); color: var(--pp-action-dark); }
.pp-start-options strong { display: block; font-size: 16px; line-height: 1.4; }
.pp-start-options small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.5; color: #475569; }

/* The build list */
.pp-build-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 12px; }
.pp-build-heading h2 { font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--pp-ink); }
.pp-build-heading span { display: block; margin-top: 2px; font-size: 13px; color: var(--pp-muted); }
.pp-build-tools { display: flex; gap: 6px; }
.pp-builder .pp-build-tools .pp-btn { min-height: 36px; padding: 6px 12px; font-size: 13px; }
@media (min-width: 1024px) { .pp-build-tools { display: none; } }
.pp-build-track { height: 6px; margin: 10px 0 14px; border-radius: 999px; background: var(--pp-border); overflow: hidden; }
.pp-build-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #34d399, #059669); transition: width .45s cubic-bezier(.2, .9, .3, 1.1); }
.pp-build-track.is-complete > span { background: linear-gradient(90deg, #059669, #34d399, #059669); background-size: 200% 100%; animation: pp-shine 2.4s linear infinite; }
@keyframes pp-shine { to { background-position: -200% 0; } }
.pp-slot-list { display: flex; flex-direction: column; gap: 8px; }

.pp-slot { position: relative; border: 1px dashed var(--pp-border-strong); border-radius: 14px; background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.pp-slot.is-filled, .pp-slot.is-included { border-style: solid; border-color: var(--pp-border); }
.pp-slot.is-next { border-style: solid; border-color: var(--pp-action); box-shadow: 0 0 0 3px rgba(16, 185, 129, .16); }
.pp-slot.is-warning { border-style: solid; border-color: #fcd34d; background: #fffdf6; }
.pp-slot.is-error { border-style: solid; border-color: #fca5a5; background: #fffafa; }
.pp-slot.is-just-added { animation: pp-slot-in .6s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pp-slot-in {
    0% { transform: scale(.985); box-shadow: 0 0 0 0 rgba(16, 185, 129, .45); }
    55% { transform: scale(1.004); box-shadow: 0 0 0 6px rgba(16, 185, 129, .18); }
    100% { transform: none; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pp-slot-empty, .pp-slot-included { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 16px; text-align: left; }
.pp-slot-empty { background: #fafbfc; transition: background-color .15s; }
.pp-slot-empty:hover:not(:disabled) { background: var(--pp-action-soft); }
.pp-slot-empty:disabled { cursor: default; }
.pp-slot.is-next .pp-slot-empty { background: #f0fdf4; }
.pp-slot-icon { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; background: #f1f5f9; color: var(--pp-muted); transition: background-color .2s, color .2s; }
.pp-slot-icon svg { width: 24px; height: 24px; transition: transform .25s cubic-bezier(.2, .9, .3, 1.4); }
.pp-slot-empty:hover .pp-slot-icon, .pp-slot.is-next .pp-slot-icon, .pp-slot-included .pp-slot-icon { background: var(--pp-action-tint); color: var(--pp-action-dark); }
.pp-slot-empty:hover .pp-slot-icon svg { transform: rotate(-8deg) scale(1.1); }
.pp-slot-text { flex: 1; min-width: 0; }
.pp-slot-text strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--pp-ink); }
.pp-slot-text small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; color: var(--pp-muted); }
.pp-slot-text .pp-slot-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--pp-action); color: #fff; font-weight: 600; }
.pp-slot-add { display: inline-flex; flex-shrink: 0; align-items: center; gap: 4px; min-height: 38px; padding: 7px 14px; border: 1px solid #a7f3d0; border-radius: 10px; background: #fff; color: var(--pp-action-dark); font-size: 14px; font-weight: 600; }
.pp-slot.is-next .pp-slot-add { border-color: var(--pp-action); background: var(--pp-action); color: #fff; animation: pp-nudge 2.6s ease-in-out infinite; }
@keyframes pp-nudge { 0%, 80%, 100% { transform: none; } 88% { transform: translateX(3px); } 94% { transform: translateX(-1px); } }

.pp-pick { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 12px 16px; }
.pp-pick + .pp-pick { border-top: 1px solid #eef2f6; }
.pp-pick-photo { display: grid; place-items: center; width: 72px; height: 72px; overflow: hidden; border: 1px solid #eef2f6; border-radius: 12px; background: #fff; color: #94a3b8; }
.pp-pick-photo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pp-pick-photo svg { width: 30px; height: 30px; }
.pp-pick-info { min-width: 0; }
.pp-pick-slot { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--pp-action-dark); }
.pp-pick-slot::before { content: ""; flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%; background: var(--pp-action) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 10px no-repeat; }
.pp-slot.is-warning .pp-pick-slot { color: var(--pp-warn-text); }
.pp-slot.is-warning .pp-pick-slot::before { background: #f59e0b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M12 6v8M12 18.5v.5'/%3E%3C/svg%3E") center / 10px no-repeat; }
.pp-slot.is-error .pp-pick-slot { color: var(--pp-error-text); }
.pp-slot.is-error .pp-pick-slot::before { background: #ef4444 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E") center / 9px no-repeat; }
.pp-pick-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--pp-ink); overflow-wrap: anywhere; }
.pp-pick-title:hover { color: var(--pp-action-dark); }
.pp-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pp-chips > span { padding: 2px 7px; border-radius: 6px; background: #f1f5f9; color: #475569; font-size: 12px; line-height: 1.5; }
.pp-pick-state { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 12px; line-height: 1.5; }
.pp-pick-state:empty { display: none; }
.pp-pick-state .is-ok { color: var(--pp-action-dark); }
.pp-pick-state .is-warning { color: var(--pp-warn-text); font-weight: 600; }
.pp-tag { padding: 1px 7px; border-radius: 6px; font-weight: 600; }
.pp-tag.is-owned { background: #e0f2fe; color: #075985; }
.pp-tag.is-locked { background: #ede9fe; color: #5b21b6; }
.pp-pick-options { display: flex; flex-wrap: wrap; gap: 0 14px; margin-top: 2px; font-size: 12px; }
.pp-pick-options button { min-height: 32px; color: var(--pp-muted); text-decoration: underline; text-underline-offset: 2px; }
.pp-pick-options button.is-on { color: #6d28d9; font-weight: 600; }
.pp-pick-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.pp-pick-price { font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--pp-ink); white-space: nowrap; }
.pp-pick-price.is-owned { font-size: 13px; color: #075985; }
.pp-qty { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--pp-muted); }
.pp-qty select { min-height: 34px; padding: 4px 28px 4px 10px; border: 1px solid var(--pp-border-strong); border-radius: 8px; font-size: 14px; background-color: #fff; }
.pp-pick-actions { display: flex; gap: 2px; }
.pp-slot-more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; border-top: 1px dashed var(--pp-border-strong); color: var(--pp-action-dark); font-size: 14px; font-weight: 600; }
.pp-slot-more:hover { background: var(--pp-action-soft); }
.pp-slot-issue { margin: 0 16px 12px; padding: 8px 10px; border-radius: 8px; font-size: 13px; line-height: 1.45; }
.pp-slot-issue.is-error { background: var(--pp-error-soft); color: var(--pp-error-text); }
.pp-slot-issue.is-warning { background: var(--pp-warn-soft); color: var(--pp-warn-text); }

/* OS, peripherals, extras */
.pp-extras { margin-top: 22px; }
.pp-extras-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin-bottom: 8px; }
.pp-extras-head h2 { font-size: 15px; font-weight: 700; color: var(--pp-ink); }
.pp-extras-head span { font-size: 12px; color: var(--pp-muted); }
.pp-extras-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pp-chip-button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 14px; border: 1px dashed var(--pp-border-strong); border-radius: 999px; background: #fff; color: var(--pp-text); font-size: 14px; transition: background-color .15s, border-color .15s, color .15s; }
.pp-chip-button:hover { border-style: solid; border-color: var(--pp-action); background: var(--pp-action-soft); color: var(--pp-action-dark); }

/* Summary: total, checks and actions only — the parts themselves are in the list. */
.pp-build-summary { border-top: 3px solid var(--pp-action); }
.pp-build-summary:focus { outline: none; }
.pp-summary-title { font-size: 15px; font-weight: 700; color: var(--pp-ink); }
.pp-summary-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin-top: 6px; }
.pp-summary-total span { font-size: 13px; color: var(--pp-muted); }
.pp-summary-total strong { font-size: 28px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; color: var(--pp-ink); white-space: nowrap; }
.pp-summary-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pp-summary-secondary .pp-btn { white-space: normal; text-align: center; }

/* The picker dialog: full screen on phones, a centred card on wide screens. */
.pp-picker-modal { animation: pp-sheet-in .28s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes pp-sheet-in { from { transform: translateY(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pp-dialog-in { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.pp-picker-modal-heading { display: flex; flex-shrink: 0; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--pp-border); }
.pp-picker-icon { display: grid; flex: 0 0 40px; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--pp-action-tint); color: var(--pp-action-dark); }
.pp-picker-icon svg { width: 22px; height: 22px; }
.pp-picker-heading-text { flex: 1; min-width: 0; }
.pp-picker-heading-text p { font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--pp-action-dark); }
.pp-picker-heading-text h2 { overflow: hidden; font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--pp-ink); text-overflow: ellipsis; white-space: nowrap; }
.pp-picker-heading-text h2:focus { outline: none; }
.pp-picker-close { display: grid; flex-shrink: 0; place-items: center; width: 44px; height: 44px; margin-right: -8px; border-radius: 10px; color: var(--pp-muted); }
.pp-picker-close:hover { background: #f1f5f9; color: var(--pp-ink); }
.pp-flow-rail { display: flex; flex-shrink: 0; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--pp-border); overflow-x: auto; scrollbar-width: none; }
.pp-flow-rail::-webkit-scrollbar { display: none; }
.pp-flow-rail li { flex: 1 1 0; min-width: 38px; }
.pp-flow-step { position: relative; display: grid; place-items: center; width: 100%; height: 38px; border-radius: 10px; background: #f1f5f9; color: #94a3b8; transition: background-color .2s, color .2s, transform .2s, box-shadow .2s; }
.pp-flow-step svg { width: 20px; height: 20px; }
.pp-flow-step:hover:not(:disabled) { background: #e2e8f0; color: var(--pp-text); }
.pp-flow-step.is-done { background: var(--pp-action-tint); color: var(--pp-action-dark); }
.pp-flow-step.is-current { background: var(--pp-action); color: #fff; box-shadow: 0 6px 14px -8px rgba(5, 150, 105, .9); transform: translateY(-1px); }
.pp-flow-tick { position: absolute; top: -5px; right: -4px; width: 17px; height: 17px; border: 2px solid #fff; border-radius: 50%; background: var(--pp-action); color: #fff; font-size: 9px; font-weight: 700; line-height: 13px; text-align: center; }
.pp-flow-added { display: flex; flex-shrink: 0; align-items: center; gap: 8px; margin: 10px 16px 0; padding: 8px 12px; border-radius: 10px; background: var(--pp-action-soft); color: var(--pp-action-dark); font-size: 13px; font-weight: 600; animation: pp-pop .35s cubic-bezier(.2, .9, .3, 1.3) both; }
.pp-flow-added span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pp-picker-filters { flex-shrink: 0; max-height: 45vh; max-height: 45dvh; padding: 12px 16px 4px; border-bottom: 1px solid var(--pp-border); overflow-y: auto; overscroll-behavior: contain; }
.pp-picker-search { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--pp-border-strong); border-radius: 12px; background: #fff; font-size: 16px; }
.pp-picker-search:focus { border-color: var(--pp-action); outline: none; box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
.pp-picker-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; min-height: 36px; margin-top: 6px; font-size: 14px; color: var(--pp-text); }
.pp-picker-count { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--pp-muted); }
.pp-picker-hint { margin-top: 2px; font-size: 12px; line-height: 1.5; color: var(--pp-muted); }
.pp-filter-actions { position: relative; }
.pp-picker-sort { position: absolute; top: 0; right: 0; max-width: calc(100% - 96px); min-height: 44px; border: 0; border-radius: 8px; padding: 8px 34px 8px 10px; color: var(--pp-text); background: #f8fafc; font-size: 13px; line-height: 1.4; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.pp-picker-sort:focus-visible { outline: 2px solid #047857; outline-offset: 2px; }
.pp-filter-details > summary { width: fit-content; min-height: 44px; padding: 11px 0; color: var(--pp-text); font-size: 14px; font-weight: 600; cursor: pointer; }
.pp-filter-details[open] > summary { color: var(--pp-action-dark); }
.pp-filter-body { padding: 2px 0 12px; }
.pp-technical-filters { margin-top: 12px; }
.pp-technical-filters button { min-height: 36px; padding: 7px 11px; }
.pp-price-filter { flex-wrap: wrap; }
.pp-price-filter input { min-height: 40px; }

.pp-candidate-area { flex: 1; min-height: 0; padding: 4px 8px 12px; overflow-y: auto; overscroll-behavior: contain; }
.pp-candidate-list { animation: pp-fade-up .3s ease-out both; }
@keyframes pp-fade-up { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.pp-candidate { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 8px; border-bottom: 1px solid #eef2f6; transition: background-color .15s; }
.pp-candidate:last-child { border-bottom: 0; }
.pp-candidate:hover { background: #f8fafc; }
.pp-candidate.is-chosen { background: var(--pp-action-soft); box-shadow: inset 3px 0 var(--pp-action); }
.pp-candidate-image { display: grid; place-items: center; width: 72px; height: 72px; overflow: hidden; border-radius: 10px; background: #fff; }
.pp-candidate-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pp-candidate-info { min-width: 0; }
.pp-candidate-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--pp-ink); overflow-wrap: anywhere; }
.pp-candidate-title:hover { color: var(--pp-action-dark); }
.pp-candidate-notes { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; margin-top: 2px; font-size: 12px; color: var(--pp-muted); }
.pp-candidate-notes .is-warning { color: #b45309; }
.pp-candidate-error { margin-top: 4px; font-size: 12px; line-height: 1.45; color: var(--pp-error-text); }
.pp-candidate-action { display: grid; grid-template-columns: auto auto; align-items: center; justify-items: end; gap: 6px 12px; }
.pp-candidate-price { grid-column: 1 / -1; }
.pp-candidate-compare { min-height: 36px; font-size: 12px; color: var(--pp-muted); }
.pp-candidate-price { line-height: 1.25; text-align: right; }
.pp-candidate-price strong { display: block; font-size: 18px; font-weight: 700; color: var(--pp-ink); white-space: nowrap; }
.pp-candidate-price span { font-size: 12px; font-weight: 600; white-space: nowrap; }
.pp-candidate-price .is-less { color: var(--pp-action-dark); }
.pp-candidate-price .is-more { color: var(--pp-muted); }
.pp-candidate-action .pp-btn { min-width: 112px; }
.pp-candidate.is-chosen .pp-btn:disabled { opacity: 1; background: var(--pp-action-tint); color: #065f46; }

/* Guided assembly between two steps: the part is in, the build is being checked. */
.pp-advancing { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 260px; padding: 32px 16px; text-align: center; }
.pp-advancing-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--pp-action); color: #fff; box-shadow: 0 12px 24px -12px rgba(5, 150, 105, .8); animation: pp-pop .45s cubic-bezier(.2, .9, .3, 1.4) both; }
.pp-advancing-mark svg { width: 32px; height: 32px; stroke-dasharray: 24; stroke-dashoffset: 24; animation: pp-draw .35s .15s ease-out forwards; }
.pp-advancing strong { max-width: 36ch; font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--pp-ink); }
.pp-advancing > span:last-child { font-size: 13px; color: var(--pp-muted); }
@keyframes pp-pop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pp-draw { to { stroke-dashoffset: 0; } }
.pp-candidate-skeleton { display: grid; gap: 10px; padding: 8px; }
.pp-candidate-skeleton span { height: 72px; border-radius: 12px; background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%); background-size: 200% 100%; animation: pp-shine 1.2s linear infinite; }

.pp-step.is-unavailable { background: #d97706; }
.pp-zone.is-unavailable .pp-body { stroke: var(--pp-warn); stroke-width: 2; }

@media (min-width: 768px) {
    /* A steady height: moving between steps or loading does not make the dialog jump. */
    .pp-picker-modal { min-height: min(720px, 92vh); animation-name: pp-dialog-in; }
}
@media (max-width: 767px) {
    .pp-start { padding: 16px; margin-top: 18px; }
    .pp-start-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    .pp-start h2 { font-size: 18px; }
    .pp-start-options { grid-template-columns: 1fr; margin-top: 12px; gap: 8px; }
    .pp-start-options > button { min-height: 76px; padding: 12px; }
    .pp-btn { min-height: 44px; }
    .pp-btn-icon { width: 44px; }
    .pp-picker-sort { font-size: 16px; }
}
@media (max-width: 639px) {
    /* Phones: app-like cards — photo and name on top, price and actions in one row below. */
    .pp-slot-empty, .pp-slot-included { gap: 12px; padding: 10px 12px; }
    .pp-slot-add { padding: 7px 12px; }
    .pp-pick { grid-template-columns: 60px minmax(0, 1fr); gap: 10px 12px; padding: 12px; }
    .pp-pick-photo { width: 60px; height: 60px; }
    .pp-pick-side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px dashed #eef2f6; }
    .pp-pick-actions { margin-left: auto; }
    .pp-slot-issue { margin: 0 12px 12px; }
    .pp-summary-total strong { font-size: 26px; }
    .pp-picker-modal-heading { padding: 10px 12px; gap: 10px; }
    .pp-flow-rail { gap: 4px; padding: 8px 12px; }
    .pp-flow-rail li { min-width: 32px; }
    .pp-flow-added { margin: 8px 12px 0; }
    .pp-picker-filters { padding: 10px 12px 2px; }
    .pp-candidate-area { padding: 0 4px 12px; }
    .pp-candidate { grid-template-columns: 64px minmax(0, 1fr); align-items: start; gap: 8px 12px; padding: 12px 8px; }
    .pp-candidate-image { width: 64px; height: 64px; }
    .pp-candidate-action { grid-column: 1 / -1; grid-template-columns: 1fr auto auto; justify-items: start; padding-left: 4px; }
    .pp-candidate-price { grid-column: auto; text-align: left; }
}
@media (max-width: 1023px) {
    .pp-builder { padding-bottom: calc(max(88px, var(--pp-mobile-total-h, 88px)) + 24px); }
    .pp-mobile-total { display: grid; grid-template-columns: minmax(80px, .65fr) minmax(0, 1.35fr); align-items: center; gap: 12px; min-height: 88px; padding: 10px max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left)); bottom: max(var(--cookie-banner-h, 0px), var(--mobile-nav-h, 0px)); }
    .pp-mobile-total > div { min-width: 0; }
    .pp-mobile-total > button { min-height: 48px; padding: 8px 12px; border-radius: 12px; line-height: 1.3; white-space: normal; }
    body:has(.pp-mobile-total[data-active="true"]) #lc-widget .lc-launcher { bottom: calc(var(--pp-mobile-total-h, 88px) + 16px + max(var(--cookie-banner-h, 0px), var(--mobile-nav-h, 0px))); }
}
@media (min-width: 768px) and (max-width: 1023px) {
    /* The shared navigation is hidden at md; do not reserve its phone height. */
    body:has(.pp-builder) { --mobile-nav-h: 0px; }
}
@media (prefers-reduced-motion: reduce) {
    .pp-build-track > span, .pp-slot, .pp-slot-icon svg, .pp-flow-step, .pp-start-options > button { transition: none; }
    .pp-build-track.is-complete > span, .pp-slot.is-just-added, .pp-slot.is-next .pp-slot-add, .pp-picker-modal,
    .pp-candidate-list, .pp-flow-added, .pp-advancing-mark, .pp-candidate-skeleton span { animation: none; }
    .pp-advancing-mark svg { animation: none; stroke-dashoffset: 0; }
    .pp-start-options > button:hover, .pp-slot-empty:hover .pp-slot-icon svg { transform: none; }
}
