/* ==========================================================================
   Motobo Finder v1.0
   Every class is prefixed .mb- and nothing here is shared with the
   calculator's app.css / admin.css, so the two cannot collide.
   ========================================================================== */
.mb-body {
  --mb-brand: #DC143C;
  --mb-brand-700: #9e0d2b;
  --mb-brand-50: #fff1f3;
  --mb-orange: #F57C00;
  --mb-indigo: #483D8B;
  --mb-ink: #14161f;
  --mb-ink-2: #3d4254;
  --mb-ink-3: #6a7085;
  --mb-line: #e5e6ec;
  --mb-surface: #fff;
  --mb-ok: #0f9d74;
  --mb-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mb-head: 'Plus Jakarta Sans', var(--mb-font);
  --mb-sh: 0 4px 24px -6px rgba(20,22,31,.12);
  --mb-sh-3: 0 18px 50px -12px rgba(20,22,31,.22);
  margin: 0; font-family: var(--mb-font); color: var(--mb-ink); line-height: 1.55;
  background:
    radial-gradient(1100px 520px at 82% -8%, rgba(72,61,139,.13), transparent 62%),
    radial-gradient(780px 460px at 4% 2%, rgba(245,124,0,.13), transparent 60%),
    linear-gradient(180deg, #fff 0%, #f5f5f7 46%);
  min-height: 100vh; display: flex; flex-direction: column;
}
.mb-body *, .mb-body *::before, .mb-body *::after { box-sizing: border-box; }
/* must beat the display rules below, which would otherwise un-hide [hidden] elements */
.mb-body [hidden] { display: none !important; }
.mb-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.mb-muted { color: var(--mb-ink-3); }
.mb-body h1, .mb-body h2, .mb-body h3 { font-family: var(--mb-head); letter-spacing: -.02em; margin: 0; }
.mb-body :focus-visible { outline: 3px solid rgba(220,20,60,.45); outline-offset: 2px; border-radius: 8px; }

/* ---------------- header ---------------- */
.mb-header { padding: 16px 0; }
.mb-header .mb-wrap { display: flex; align-items: center; gap: 16px; }
.mb-back { display: inline-flex; align-items: center; gap: 7px; color: var(--mb-ink-2); text-decoration: none; font-weight: 600; font-size: .9rem; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--mb-line); background: rgba(255,255,255,.7); }
.mb-back:hover { border-color: var(--mb-ink-3); color: var(--mb-ink); }
.mb-logo { margin: 0 auto; display: block; }
.mb-logo img { display: block; height: 30px; width: auto; }
.mb-city { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--mb-line); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: .88rem; cursor: pointer; font-family: inherit; color: var(--mb-ink); }
.mb-city i { color: var(--mb-brand); }
.mb-city:hover { border-color: var(--mb-brand); }
@media (max-width: 640px) { .mb-back span { display: none; } .mb-logo img { height: 24px; } }

/* ---------------- steps ---------------- */
.mb-main { flex: 1; padding: 10px 0 60px; }
.mb-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.mb-chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 1px solid var(--mb-line); background: rgba(255,255,255,.75); border-radius: 12px; padding: 7px 14px; cursor: pointer; font-family: inherit; text-align: left; transition: all .15s; }
.mb-chip[disabled] { opacity: .45; cursor: default; }
.mb-chip-k { font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--mb-ink-3); }
.mb-chip-v { font-size: .86rem; font-weight: 700; color: var(--mb-ink); }
.mb-chip.is-done { border-color: rgba(15,157,116,.4); background: #eefaf5; }
.mb-chip.is-done .mb-chip-k { color: var(--mb-ok); }
.mb-chip.is-now { border-color: var(--mb-brand); box-shadow: 0 0 0 4px rgba(220,20,60,.12); background: #fff; }
.mb-chip:not([disabled]):hover { transform: translateY(-1px); }

/* ---------------- stage ---------------- */
.mb-stage { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .mb-stage { grid-template-columns: 1fr; gap: 12px; } }

.mb-bot { position: relative; display: flex; justify-content: center; padding-top: 6px; }
.mb-bot-img { width: 100%; max-width: 260px; height: auto; display: block; position: relative; z-index: 1; animation: mb-float 5s ease-in-out infinite; }
.mb-bot-glow { position: absolute; inset: auto 0 6% 0; height: 42px; margin: 0 auto; width: 62%; background: radial-gradient(closest-side, rgba(245,124,0,.30), transparent 72%); filter: blur(6px); }
.mb-bot.is-thinking .mb-bot-img { animation: mb-scan .6s ease both; }
@keyframes mb-float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }
@keyframes mb-scan { 0% { filter: none } 40% { filter: hue-rotate(-12deg) brightness(1.12) } 100% { filter: none } }
@media (max-width: 860px) {
  .mb-bot { padding: 0; }
  .mb-bot-img { max-width: 132px; }
}

.mb-panel { min-width: 0; }
.mb-bubble { position: relative; background: var(--mb-surface); border: 1px solid var(--mb-line); border-radius: 20px; padding: 22px 24px; box-shadow: var(--mb-sh); }
.mb-bubble::before { content: ''; position: absolute; left: -9px; top: 30px; width: 18px; height: 18px; background: var(--mb-surface); border-left: 1px solid var(--mb-line); border-bottom: 1px solid var(--mb-line); transform: rotate(45deg); border-radius: 0 0 0 5px; }
@media (max-width: 860px) { .mb-bubble::before { left: 28px; top: -9px; transform: rotate(135deg); } }
.mb-q { font-family: var(--mb-head); font-size: clamp(1.3rem, 2.8vw, 1.8rem); font-weight: 800; margin: 0; min-height: 1.4em; letter-spacing: -.02em; }
.mb-sub { margin: 6px 0 0; color: var(--mb-ink-3); font-size: .94rem; }

.mb-count { display: inline-flex; align-items: baseline; gap: 7px; margin: 16px 0 2px; padding: 6px 14px; border-radius: 999px; background: rgba(72,61,139,.09); }
.mb-count-num { font-family: var(--mb-head); font-weight: 800; font-size: 1.1rem; color: var(--mb-indigo); font-variant-numeric: tabular-nums; }
.mb-count-lbl { font-size: .82rem; color: var(--mb-ink-2); font-weight: 600; }

/* ---------------- options ---------------- */
.mb-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 10px; margin-top: 18px; }
.mb-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: var(--mb-surface); border: 1px solid var(--mb-line); border-radius: 16px; padding: 16px 18px; cursor: pointer; font-family: inherit; text-align: left; transition: transform .15s, box-shadow .15s, border-color .15s; }
.mb-opt > i { font-size: 1.5rem; color: var(--mb-brand); margin-bottom: 6px; }
.mb-opt-emoji { font-size: 1.7rem; line-height: 1; margin-bottom: 4px; }
.mb-opt-name { font-family: var(--mb-head); font-weight: 700; font-size: 1rem; color: var(--mb-ink); }
.mb-opt-n { font-size: .78rem; color: var(--mb-ink-3); font-weight: 600; }
.mb-opt:hover { transform: translateY(-2px); box-shadow: var(--mb-sh); border-color: transparent; }
.mb-opt.is-picked { border-color: var(--mb-brand); background: var(--mb-brand-50); box-shadow: 0 0 0 4px rgba(220,20,60,.14); }
.mb-opt-any { background: linear-gradient(135deg, #fff, #f6f5fd); border-style: dashed; }
.mb-opt-any > i { color: var(--mb-indigo); }
.mb-in { animation: mb-rise .32s ease both; }
@keyframes mb-rise { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }

/* ---------------- budget ---------------- */
.mb-budget { margin-top: 18px; }
.mb-budget-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.mb-preset { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--mb-line); background: #fff; border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: .88rem; cursor: pointer; font-family: inherit; color: var(--mb-ink); }
.mb-preset small { background: #f0f0f4; border-radius: 999px; padding: 1px 7px; font-size: .72rem; color: var(--mb-ink-3); font-weight: 700; }
.mb-preset:hover { border-color: var(--mb-brand); }
.mb-preset.is-on { background: var(--mb-ink); border-color: var(--mb-ink); color: #fff; }
.mb-preset.is-on small { background: rgba(255,255,255,.2); color: #fff; }
.mb-preset.is-empty { opacity: .4; cursor: not-allowed; }
.mb-budget-slider { background: #fff; border: 1px solid var(--mb-line); border-radius: 18px; padding: 20px 22px; box-shadow: var(--mb-sh); }
.mb-budget-read { font-family: var(--mb-head); font-size: 1.5rem; font-weight: 800; text-align: center; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.mb-budget-slider input[type=range] { width: 100%; accent-color: var(--mb-brand); height: 26px; cursor: pointer; }
.mb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--mb-brand); color: #fff; border: 0; border-radius: 14px; padding: 13px 22px; font-weight: 700; font-family: inherit; font-size: .96rem; cursor: pointer; text-decoration: none; box-shadow: 0 8px 22px -10px rgba(220,20,60,.8); transition: background .15s, transform .1s; }
.mb-btn:hover { background: var(--mb-brand-700); color: #fff; }
.mb-btn:active { transform: translateY(1px); }
.mb-btn[disabled] { background: #c9cad2; box-shadow: none; cursor: not-allowed; }
.mb-btn-lg { width: 100%; margin-top: 16px; padding: 15px 22px; font-size: 1.02rem; }
.mb-btn-ghost { background: #fff; color: var(--mb-ink); border: 1px solid var(--mb-line); box-shadow: none; }
.mb-btn-ghost:hover { background: #f6f6f9; color: var(--mb-ink); border-color: var(--mb-ink-3); }

.mb-nav { display: flex; justify-content: space-between; margin-top: 16px; }
.mb-link, .mb-link-inline { background: none; border: 0; padding: 0; font-family: inherit; font-weight: 600; font-size: .88rem; color: var(--mb-ink-3); cursor: pointer; }
.mb-link:hover { color: var(--mb-ink); }
.mb-link-inline { color: var(--mb-brand-700); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- results ---------------- */
.mb-results { margin-top: 34px; }
.mb-r-head { margin-bottom: 18px; }
.mb-r-head h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; }
.mb-r-head p { margin: 4px 0 0; color: var(--mb-ink-3); }
.mb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.mb-card { background: #fff; border: 1px solid var(--mb-line); border-radius: 20px; padding: 18px; box-shadow: var(--mb-sh); display: flex; flex-direction: column; gap: 12px; animation: mb-pop .38s ease both; animation-delay: calc(var(--i) * 55ms); }
@keyframes mb-pop { from { opacity: 0; transform: translateY(14px) scale(.98) } to { opacity: 1; transform: none } }
.mb-card-top { display: flex; gap: 12px; align-items: flex-start; }
.mb-card-logo { width: 46px; height: 46px; border-radius: 13px; background: var(--mb-brand-50); display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.mb-card-top h3 { font-size: 1.05rem; font-weight: 700; }
.mb-card-top p { margin: 2px 0 0; font-size: .84rem; color: var(--mb-ink-3); }
.mb-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mb-tag { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #f0f0f4; color: var(--mb-ink-2); }
.mb-tag-ok { background: #e3f7ef; color: #0b7a5a; }
.mb-fuel-petrol { background: #fff4e0; color: #9a5b00; }
.mb-fuel-diesel { background: #e9ecf5; color: #36405e; }
.mb-fuel-electric { background: #e3f7ef; color: #0b7a5a; }
.mb-fuel-hybrid { background: #eaf6e4; color: #3b7a1a; }
.mb-fuel-cng { background: #e6f3fa; color: #0d6687; }
.mb-card-price { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #f0f0f4; padding-top: 12px; margin-top: auto; }
.mb-card-price small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--mb-ink-3); font-weight: 700; }
.mb-card-price b { font-family: var(--mb-head); font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.mb-card-onroad { text-align: right; }
.mb-card-onroad b { color: var(--mb-brand); font-size: 1.2rem; }
.mb-card-go { display: inline-flex; align-items: center; justify-content: space-between; gap: 6px; background: #f6f6f9; border-radius: 12px; padding: 11px 14px; font-weight: 700; font-size: .86rem; color: var(--mb-ink); text-decoration: none; transition: background .15s; }
.mb-card-go:hover { background: var(--mb-brand-50); color: var(--mb-brand-700); }
.mb-r-foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---------------- city modal ---------------- */
.mb-modal { position: fixed; inset: 0; z-index: 90; background: rgba(20,22,31,.45); display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(3px); }
.mb-modal-card { background: #fff; border-radius: 24px; box-shadow: var(--mb-sh-3); width: 100%; max-width: 620px; max-height: 84vh; overflow: auto; padding: 22px 24px 24px; }
.mb-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mb-modal-head h2 { font-size: 1.25rem; font-weight: 800; }
.mb-x { background: none; border: 0; font-size: 1.1rem; color: var(--mb-ink-3); cursor: pointer; padding: 6px; }
.mb-input { width: 100%; height: 46px; border: 1px solid var(--mb-line); border-radius: 14px; padding: 0 16px; font-family: inherit; font-size: 1rem; background: #fafafb; margin-bottom: 14px; }
.mb-input:focus { outline: none; border-color: var(--mb-brand); box-shadow: 0 0 0 4px rgba(220,20,60,.14); background: #fff; }
.mb-city-grp { margin-bottom: 16px; }
.mb-city-grp h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--mb-ink-3); margin: 0 0 8px; font-family: var(--mb-font); font-weight: 700; }
.mb-city-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mb-city-chip { border: 1px solid var(--mb-line); background: #fff; border-radius: 12px; padding: 9px 14px; font-family: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--mb-ink); }
.mb-city-chip:hover { border-color: var(--mb-brand); }
.mb-city-chip.is-on { background: var(--mb-brand-50); border-color: var(--mb-brand); color: var(--mb-brand-700); }

/* ---------------- setup notice / footer ---------------- */
.mb-setup { background: #fff; border: 1px solid var(--mb-line); border-radius: 20px; padding: 30px; max-width: 640px; box-shadow: var(--mb-sh); }
.mb-setup h1 { font-size: 1.4rem; margin-bottom: 10px; }
.mb-setup code { background: #f2f2f6; padding: 2px 6px; border-radius: 6px; font-size: .88em; }
.mb-setup .mb-btn { margin-top: 16px; }
.mb-footer { border-top: 1px solid var(--mb-line); padding: 18px 0; font-size: .82rem; color: var(--mb-ink-3); background: rgba(255,255,255,.6); }
.mb-footer .mb-wrap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mb-footer a { color: var(--mb-ink-2); text-decoration: none; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  .mb-body *, .mb-body *::before, .mb-body *::after { animation: none !important; transition: none !important; }
}
