/* ══ ALLIANCE — Build Your Forklift (on top of world.css + planner.css) ══ */
#fb-ui { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
#fb-ui > * { pointer-events: auto; }

.fb-panel { width: 340px; }
.fb-steps { padding: 6px 16px 22px; overflow-y: auto; flex: 1; }
.fb-step { padding: 14px 0 6px; border-bottom: 1px solid var(--pl-line); }
.fb-step:last-child { border-bottom: 0; }
.fb-step h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-family: 'Oswald', sans-serif; font-size: 15px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
.fb-step h3 small { margin-left: auto; color: var(--pl-mute); font-family: 'DM Sans', sans-serif; font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; }

/* option cards */
.fb-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fb-cards--1 { grid-template-columns: 1fr; }
.fb-card {
  display: flex; flex-direction: column; gap: 3px; text-align: left; min-height: 58px;
  padding: 10px 11px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--pl-line);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.fb-card:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.28); }
.fb-card b { font-family: 'Oswald', sans-serif; font-size: 14.5px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.2; }
.fb-card span { color: var(--pl-mute); font-size: 12px; line-height: 1.35; }
.fb-card.on { background: rgba(157, 29, 32, 0.22); border-color: #d24a4e; box-shadow: inset 0 0 0 1px #d24a4e; }
.fb-card .fb-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; vertical-align: -2px; margin-right: 7px; border: 1px solid rgba(255, 255, 255, 0.4); }

/* chips (capacity, lift height, fork length) */
.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-chip {
  height: 36px; padding: 0 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--pl-line);
  font-family: 'Oswald', sans-serif; font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
}
.fb-chip:hover { background: rgba(255, 255, 255, 0.1); }
.fb-chip.on { background: #fff; color: var(--pl-ink); border-color: #fff; }
.fb-sublabel { color: var(--pl-mute); font-size: 12.5px; margin: 12px 0 8px; }

/* toggles (attachments, safety) */
.fb-toggles { display: grid; gap: 6px; }
.fb-toggle {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; text-align: left;
  padding: 9px 11px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--pl-line);
}
.fb-toggle b { display: block; font-size: 14px; font-weight: 600; }
.fb-toggle span { display: block; color: var(--pl-mute); font-size: 12px; margin-top: 1px; }
.fb-toggle i { width: 38px; height: 22px; border-radius: 11px; background: rgba(255, 255, 255, 0.18); position: relative; transition: background 0.15s ease; }
.fb-toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s ease; }
.fb-toggle.on { border-color: rgba(210, 74, 78, 0.7); }
.fb-toggle.on i { background: #d24a4e; }
.fb-toggle.on i::after { transform: translateX(16px); }

/* paint swatches */
.fb-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fb-swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 10px; border: 1px solid transparent; background: transparent; font-size: 11.5px; color: var(--pl-mute); line-height: 1.2; text-align: center; }
.fb-swatch i { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); display: block; }
.fb-swatch.on { border-color: #d24a4e; color: #fff; background: rgba(157, 29, 32, 0.18); }
.fb-swatch.on i { border-color: #fff; }

/* lift slider + camera views under the truck */
.fb-stagebar {
  position: absolute; bottom: 14px; left: calc(50% + 170px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px;
  background: var(--pl-panel); border: 1px solid var(--pl-line); border-radius: 12px;
}
.fb-lift { display: flex; align-items: center; gap: 10px; font-family: 'Oswald', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--pl-mute); white-space: nowrap; }
.pl .fb-lift input { width: 160px; height: 28px; padding: 0; background: none; border: 0; box-shadow: none; accent-color: #d24a4e; }
#fb-spin.on { background: #fff; color: var(--pl-ink); }
.fb-lift[hidden], #fb-drive[hidden] { display: none; }
.fb-lift em { font-style: normal; }

/* spec sheet (right) */
.fb-specs { width: 300px; top: 68px; bottom: auto; max-height: calc(100% - 82px); overflow-y: auto; }
.fb-specs h4 { font-family: 'Oswald', sans-serif; font-size: 18px; font-weight: 600; line-height: 1.2; margin: 0 0 4px; }
.fb-specs .fb-brandline { color: var(--pl-mute); font-size: 12.5px; margin: 0 0 10px; }
.fb-specs dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: 13px; }
.fb-specs dt { color: var(--pl-mute); }
.fb-specs dd { margin: 0; text-align: right; font-weight: 600; }
.fb-specs .pl-btn { width: 100%; }
.fb-note { color: var(--pl-mute); font-size: 11.5px; line-height: 1.45; margin: 10px 0 0; }

@media (max-width: 1100px) {
  .fb-specs { display: none; }
  .fb-stagebar { left: calc(50% + 170px); }
}
@media (max-width: 760px) {
  .fb-panel { width: auto; }
  .fb-stagebar { top: 60px; bottom: auto; left: 10px; right: 10px; transform: none; padding: 6px 8px 6px 12px; gap: 8px; justify-content: space-between; }
  .fb-lift span { display: none; }
  .pl .fb-lift input { width: 110px; }
  /* a reach truck's second slider gets its own pill under the bar, opposite the zoom */
  #fb-reach-box { position: absolute; top: calc(100% + 10px); left: 0; padding: 6px 12px; background: var(--pl-panel); border: 1px solid var(--pl-line); border-radius: 12px; }
  #fb-reach-box span { display: inline; }
  .fb-stagebar .pl-seg button { padding: 0 9px; }
  .fb-stagebar .pl-zoom { position: absolute; top: calc(100% + 10px); right: 0; flex-direction: column; }
}

/* see this truck in real life: a card at the top of the spec sheet, a chip
   over the stage where the spec sheet is hidden, and the photo viewer */
.fb-real-card {
  display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 12px; width: 100%;
  margin: 0 0 14px; padding: 8px 12px 8px 8px; text-align: left; color: #fff;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--pl-line); border-radius: 12px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.fb-real-card:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); }
.fb-real-card img { width: 96px; height: 68px; object-fit: contain; background: #fff; border-radius: 8px; display: block; }
.fb-real-card b { display: block; font-family: 'Oswald', sans-serif; font-size: 15px; font-weight: 600; line-height: 1.2; }
.fb-real-card small { display: block; color: var(--pl-mute); font-size: 12px; line-height: 1.35; margin-top: 3px; }
.fb-real-card i { color: var(--pl-mute); }
.fb-real-chip { display: none; }
.fb-real-chip[hidden] { display: none !important; }
.pl-sheet--photo { width: min(980px, 100%); }
.fb-photo { background: #fff; border-radius: 12px; overflow: hidden; margin: 4px 0 16px; display: grid; place-items: center; }
.fb-photo img { display: block; width: 100%; height: auto; max-height: 62vh; object-fit: contain; }
@media (max-width: 1100px) {
  .fb-real-chip {
    position: absolute; top: 68px; right: 14px; display: flex; align-items: center; gap: 10px;
    padding: 5px 14px 5px 5px; border-radius: 12px; color: #fff;
    background: var(--pl-panel); border: 1px solid var(--pl-line);
    font-family: 'Oswald', sans-serif; font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  }
  .fb-real-chip img { width: 64px; height: 44px; object-fit: contain; background: #fff; border-radius: 8px; display: block; }
}
@media (max-width: 760px) {
  .fb-real-chip { top: 112px; right: auto; left: 10px; font-size: 13px; padding-right: 12px; }
  .fb-real-chip img { width: 54px; height: 38px; }
  .fb-photo img { max-height: 52vh; }
}

/* test drive: on the spec card above the quote, and in the top bar */
.fb-specs .fb-drive-2 { width: 100%; margin-bottom: 8px; text-decoration: none; }
.pl-actions #fb-drive { text-decoration: none; }
@media (max-width: 760px) {
  .pl-actions #fb-drive span { display: inline; }
}

/* guided setup */
.fb-wiz {
  position: absolute; inset: 0; z-index: 35; display: flex; align-items: center; justify-content: center; padding: 28px 16px;
  background: rgba(20, 18, 19, 0.62); backdrop-filter: blur(3px);
  animation: fbWizIn 0.3s ease both;
}
.fb-wiz[hidden] { display: none; }
.fb-wiz.leaving { animation: fbWizOut 0.28s ease both; }
@keyframes fbWizIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fbWizOut { to { opacity: 0; } }
.fb-wiz__card {
  width: min(880px, 100%); max-height: 100%; display: flex; flex-direction: column;
  background: var(--pl-ink); border: 1px solid var(--pl-line); border-radius: 18px;
  padding: 22px 30px 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.fb-wiz__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.fb-wiz__logo { height: 34px; width: auto; display: block; }
.fb-wiz__close { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--pl-line); background: rgba(255, 255, 255, 0.06); color: #fff; font-size: 16px; }
.fb-wiz__close:hover { background: rgba(255, 255, 255, 0.14); }
.fb-wiz__progress { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.fb-wiz__progress i { display: block; height: 100%; background: #d24a4e; transform-origin: left; transition: transform 0.35s ease; }
.fb-wiz__count { color: var(--pl-mute); font-size: 13.5px; margin: 12px 0 2px; }
.fb-wiz__title { font-family: 'Oswald', sans-serif; font-size: 30px; font-weight: 700; line-height: 1.15; margin: 0 0 6px; }
.fb-wiz__sub { color: rgba(255, 255, 255, 0.74); font-size: 15px; line-height: 1.5; margin: 0 0 16px; }
.fb-wiz__body { overflow-y: auto; min-height: 0; flex: 1; padding: 2px 2px 6px; }
.fb-wiz__foot { display: flex; align-items: center; gap: 12px; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--pl-line); }
.fb-wiz__foot #fb-wiz-next { margin-left: auto; }
.fb-wiz__skip { background: none; border: 0; color: var(--pl-mute); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; padding: 6px; }
.fb-wiz__skip:hover { color: #fff; }
.fb-wiz .pl-btn:disabled { opacity: 0.35; }
/* photo cards (type, brand) */
.fb-wgrid { display: grid; gap: 12px; }
.fb-wgrid--4 { grid-template-columns: repeat(4, 1fr); }
.fb-wgrid--3 { grid-template-columns: repeat(3, 1fr); }
.fb-wcard {
  display: flex; flex-direction: column; text-align: left; gap: 4px; padding: 10px 10px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--pl-line); color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.fb-wcard:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); transform: translateY(-2px); }
.fb-wcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border-radius: 10px; margin-bottom: 8px; }
.fb-wcard .fb-wnoimg { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; background: #fff; border-radius: 10px; margin-bottom: 8px; color: #9d1d20; font-size: 34px; }
.fb-wcard b { font-family: 'Oswald', sans-serif; font-size: 17px; font-weight: 600; line-height: 1.2; padding: 0 4px; }
.fb-wcard span { color: var(--pl-mute); font-size: 13px; line-height: 1.4; padding: 0 4px; }
.fb-wcard.on { background: rgba(157, 29, 32, 0.22); border-color: #d24a4e; box-shadow: inset 0 0 0 1px #d24a4e; }
/* capacity: a grid of real models */
.fb-wgrid--caps { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.fb-wcap {
  display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--pl-line); color: #fff;
}
.fb-wcap:hover { background: rgba(255, 255, 255, 0.1); }
.fb-wcap b { font-family: 'Oswald', sans-serif; font-size: 19px; font-weight: 600; }
.fb-wcap span { color: var(--pl-mute); font-size: 12.5px; }
.fb-wcap.on { background: #fff; color: var(--pl-ink); border-color: #fff; }
.fb-wcap.on span { color: #55504f; }
.fb-wiz .fb-cards--3 { grid-template-columns: repeat(3, 1fr); }
.fb-wiz .fb-toggles--2 { grid-template-columns: 1fr 1fr; }
.fb-wiz .fb-chip { height: 40px; padding: 0 16px; font-size: 15px; }
@media (max-width: 760px) {
  .fb-wiz { padding: 0; align-items: stretch; }
  .fb-wiz__card { border-radius: 0; border: 0; padding: 16px 16px 14px; max-height: none; height: 100%; }
  .fb-wiz__title { font-size: 24px; }
  .fb-wiz__sub { font-size: 14px; margin-bottom: 12px; }
  .fb-wgrid--4, .fb-wgrid--3 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .fb-wcard b { font-size: 15px; }
  .fb-wcard span { font-size: 12px; }
  .fb-wiz .fb-cards--3, .fb-wiz .fb-toggles--2 { grid-template-columns: 1fr; }
  .fb-wiz__skip { font-size: 13px; padding: 4px; }
}
