/*
 * Site-wide styles for Spareware.
 * Propshaft serves every file in app/assets/stylesheets, so new style files can be added next to this one.
 */

:root {
  --ink: #1d2433;
  --muted: #667085;
  --line: #e4e7ec;
  --brand: #d92d20;
  --brand-dark: #b42318;
  --bg: #f9fafb;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

a { color: var(--brand-dark); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.site-header nav { display: flex; align-items: center; gap: 1rem; }
.site-header form { margin: 0; }

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--brand);
  text-decoration: none;
}

.container { max-width: 48rem; margin: 2rem auto; padding: 0 1.25rem; }

.muted { color: var(--muted); }

.flash { padding: 0.6rem 0.9rem; border-radius: 6px; }
.flash.notice { background: #ecfdf3; color: #067647; }
.flash.alert  { background: #fef3f2; color: var(--brand-dark); }

.hero h1 { font-size: 2rem; line-height: 1.2; }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
a.button { display: inline-block; text-decoration: none; }

.form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 24rem; }

input[type="email"], input[type="password"], input[type="text"], input[type="tel"],
input[type="number"], input[type="search"], select, textarea {
  padding: 0.6rem 0.75rem;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 6px;
}

input[type="submit"], .button {
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

input[type="submit"]:hover, .button:hover { background: var(--brand-dark); }

.flash ul { margin: 0; padding-inline-start: 1.1rem; }

.form label { font-weight: 600; margin-bottom: -0.5rem; }
.hint { font-size: 0.875rem; margin-top: -0.5rem; }

.role-picker {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.role-picker legend { font-weight: 600; margin-bottom: 0.5rem; }

.form .role-option {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.9rem 1rem;
  font-weight: normal;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.role-option input { margin-top: 0.3rem; accent-color: var(--brand); }
.role-option > span { display: flex; flex-direction: column; }
.role-option:has(input:checked) { border-color: var(--brand); background: #fff8f7; }

.link-button {
  padding: 0;
  font: inherit;
  color: var(--brand-dark);
  background: none;
  border: 0;
  text-decoration: underline;
  cursor: pointer;
}

.details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.details dt { font-weight: 600; }
.details dd { margin: 0; overflow-wrap: anywhere; }

/* ---- Shared bits ---- */
.small { font-size: 0.875rem; }
.error { color: var(--brand-dark); }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.checkbox { display: flex; gap: 0.5rem; align-items: center; font-weight: normal !important; margin: 0 !important; }
.site-header nav { flex-wrap: wrap; justify-content: flex-end; }
.part-image { flex-shrink: 0; border-radius: 8px; }

.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--ink);
}
.badge-new-genuine     { background: #ecfdf3; color: #067647; }
.badge-new-aftermarket { background: #eff8ff; color: #175cd3; }
.badge-used-genuine    { background: #fffaeb; color: #b54708; }
.badge-printed-3d      { background: #f4f3ff; color: #5925dc; }

/* ---- Vehicle picker ---- */
.picker { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; margin: 1rem 0; }
.picker-field { display: flex; flex-direction: column; gap: 0.25rem; font-weight: 600; min-width: 9rem; }

/* ---- Seller parts list ---- */
.parts-form { display: flex; flex-direction: column; gap: 0.75rem; }
.part-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.75rem 1rem;
  align-items: start;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 8px;
}
.part-row:has(.part-pick input:checked) { border-color: var(--brand); background: #fff8f7; }
.part-row.has-errors { border-color: var(--brand-dark); }
.part-pick input { width: 1.25rem; height: 1.25rem; margin-top: 0.25rem; accent-color: var(--brand); }
.part-info { display: flex; flex-direction: column; gap: 0.15rem; }
.part-info .listed { color: #067647; }
.part-fields { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.part-fields label { display: flex; flex-direction: column; gap: 0.2rem; }
.part-fields input[type="number"] { width: 7rem; }
.sticky-submit { position: sticky; bottom: 0; padding: 0.75rem 0; background: var(--bg); }

/* ---- Cards (listings, results, orders) ---- */
.cards { display: flex; flex-direction: column; gap: 0.75rem; }
.card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.card.inactive { opacity: 0.65; }
.card-body { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; min-width: 0; }
.card-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
.card-actions form { margin: 0; }
a.card { color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--brand); }

@media (max-width: 30rem) {
  .card { flex-wrap: wrap; }
  .card-actions { flex-direction: row; width: 100%; justify-content: flex-start; }
}

/* ---- Buyer search ---- */
.search-form { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.search-box { margin: 0; padding: 0.75rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.search-box legend { font-weight: 600; padding: 0 0.25rem; }
.search-box .picker { margin: 0; }
.search-row { display: flex; gap: 0.5rem; }
.search-row input[type="search"] { flex: 1; min-width: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.filters input, .checkbox input { accent-color: var(--brand); }
.sort { align-self: flex-end; display: flex; gap: 0.5rem; align-items: center; }
.empty { padding: 1rem; background: #fff; border: 1px dashed var(--line); border-radius: 8px; }
.price { font-size: 1.125rem; }
.price.big { font-size: 1.75rem; font-weight: 700; margin: 0.25rem 0; }
.listing-head { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.listing-head h1 { margin: 0 0 0.25rem; }
.fits { columns: 2; padding-inline-start: 1.1rem; }
.hero-search { max-width: 32rem; margin-top: 1.25rem; }

/* ---- Checkout and orders ---- */
.checkout-form { max-width: 28rem; margin-top: 1.25rem; }
.checkout-form h2 { margin: 1rem 0 0; font-size: 1.125rem; }
.checkout-form select { max-width: 6rem; }
.status { display: inline-block; font-size: 0.875rem; font-weight: 600; }
.status-paid             { color: #b54708; }
.status-ready-for-pickup { color: #175cd3; }
.status-picked-up        { color: #5925dc; }
.status-delivered        { color: #067647; }
.status-cancelled        { color: var(--muted); }
.timeline { list-style: none; margin: 1rem 0 1.5rem; padding: 0; border-inline-start: 2px solid var(--line); }
.timeline li { position: relative; display: flex; flex-wrap: wrap; gap: 0 0.75rem; padding-block: 0.3rem; padding-inline: 1.25rem 0; }
.timeline li::before {
  content: ""; position: absolute; inset-inline-start: -7px; top: 0.6rem;
  width: 12px; height: 12px; border-radius: 50%; background: var(--line);
}
.timeline li.done::before { background: var(--brand); }
.timeline li.todo { color: var(--muted); }
.cta form { margin: 0; }
.cta { align-items: center; margin: 1rem 0; }

/* ---- My Garage ---- */
.vehicle-bar { background: #fff8f7; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.vehicle-bar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; margin: 0 auto; padding: 0.5rem 1.25rem; }
.vehicle-bar form { margin: 0; }
.fit { font-size: 0.8rem; font-weight: 600; }
.fits-yes { color: #067647; }
.fits-no { color: #b54708; }
.garage-card.current { border-color: var(--brand); }
p.search-box { margin: 0; }

/* ---- Categories, filters, pages ---- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.75rem; }
.category-tile {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem; padding: 0.9rem 0.5rem;
  text-align: center; font-weight: 600; color: var(--ink); text-decoration: none;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.category-tile:hover { border-color: var(--brand); }
.filters-box summary { font-weight: 600; cursor: pointer; }
.filter-grid { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; margin: 0.75rem 0; }
.filter { display: flex; flex-direction: column; gap: 0.25rem; font-weight: 600; }
.filter .filters { font-weight: normal; }
.price-range { display: flex; align-items: center; gap: 0.4rem; font-weight: normal; }
.price-range input { width: 5.5rem; }
.pagination { display: flex; justify-content: center; gap: 1.25rem; margin: 1.25rem 0; }

/* ---- Cart ---- */
.buy-box { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.button.secondary, button.secondary { background: var(--ink); }
.button.secondary:hover, button.secondary:hover { background: #000; }
button.button { font: inherit; font-weight: 600; }
.cart-shop { margin-bottom: 1.25rem; }
.small-heading { font-size: 1rem; margin: 0 0 0.5rem; }
.cart-item.has-problem { border-color: var(--brand-dark); }
.strong-link { font-weight: 600; }
.checkout-shop { padding: 0.6rem 0.9rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.checkout-shop ul { margin: 0.25rem 0 0; padding-inline-start: 1.1rem; }
.address-fields { max-width: none; }
.address-fields[hidden] { display: none; }
.items { width: 100%; border-collapse: collapse; margin-bottom: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.items th, .items td { padding: 0.5rem 0.75rem; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.items .num { text-align: end; white-space: nowrap; }
[hidden] { display: none !important; }

/* ---- Photos ---- */
.part-image.photo { object-fit: cover; background: #f2f4f7; }
.gallery { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.gallery img { width: 9rem; height: 9rem; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
/* A photo that opens large when tapped (photo viewer). */
.photo-open { display: inline-block; cursor: zoom-in; border-radius: 8px; }
.photo-open:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.photo-manage { display: flex; flex-wrap: wrap; gap: 0.75rem; border: 0; padding: 0; margin: 0; }
.photo-manage legend { font-weight: 600; margin-bottom: 0.4rem; }
.form .photo-thumb { display: flex; flex-direction: column; gap: 0.25rem; font-weight: normal; margin: 0; }
.photo-thumb img { width: 6rem; height: 6rem; object-fit: cover; border-radius: 6px; }
.notes { white-space: normal; }

/* ---- Reviews ---- */
.stars { color: #f79009; letter-spacing: 0.05em; }
.rating { white-space: nowrap; }
.star-picker { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 0.15rem; border: 0; padding: 0; margin: 0; }
.star-picker legend { font-weight: 600; margin-bottom: 0.25rem; }
.star-picker input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.form .star-picker label { font-size: 2rem; color: var(--line); cursor: pointer; margin: 0; line-height: 1; }
.star-picker input:checked ~ label, .star-picker label:hover, .star-picker label:hover ~ label { color: #f79009; }
.star-picker input:focus-visible + label { outline: 2px solid var(--brand); }

/* ---- Saved and recently viewed ---- */
.save-button { margin-top: 0.5rem; }
.save-button.saved { color: var(--brand); font-weight: 600; }
.saved-actions { display: flex; justify-content: flex-end; gap: 0.75rem; align-items: center; margin-top: 0.25rem; }
.saved-actions form { margin: 0; }
.recent { margin-top: 2rem; }
.recent-strip { display: flex; gap: 0.75rem; overflow-x: auto; padding-bottom: 0.5rem; }
.recent-tile {
  flex: 0 0 9rem; display: flex; flex-direction: column; gap: 0.25rem; padding: 0.6rem;
  color: var(--ink); text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.recent-tile:hover { border-color: var(--brand); }

/* ---- Search suggestions ---- */
.autocomplete { position: relative; flex: 1; min-width: 0; }
.autocomplete input[type="search"] { width: 100%; box-sizing: border-box; }
.suggestions {
  position: absolute; z-index: 10; inset-inline: 0; top: calc(100% + 4px);
  margin: 0; padding: 0.25rem 0; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgb(16 24 40 / 0.12);
}
.suggestions a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0.75rem; color: var(--ink); text-decoration: none; }
.suggestions a:hover, .suggestions [aria-selected="true"] a { background: #fff8f7; }
.vin-form { max-width: 28rem; }
.vin-input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- Languages ---- */
/* Styles above use start/end (not left/right), so they mirror by themselves for Arabic (dir="rtl"). */
/* Globe button: opens the language and currency page. */
.prefs-button { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; padding: 0 0.6rem;
  border: 1px solid var(--line, #ddd); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 0.875rem; }
.prefs-button:hover, .prefs-button:focus-visible { border-color: var(--ink); }
.pref-tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--line, #ddd); margin-bottom: 1rem; }
.pref-tabs a { padding: 0.75rem 0; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; }
.pref-tabs a.current { color: var(--ink); border-bottom-color: var(--ink); }
.pref-grid { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); }
.pref-grid form { margin: 0; }
.pref-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; width: 100%; min-height: 56px;
  padding: 0.6rem 0.8rem; text-align: start; background: transparent; color: var(--ink); border: 1px solid transparent;
  border-radius: 10px; cursor: pointer; font: inherit; }
.pref-tile:hover, .pref-tile:focus-visible { background: #f3f3f3; }
.pref-tile.current { border-color: var(--ink); }
.pref-tile .pref-sub { color: var(--muted); font-size: 0.875rem; }
/* Arabic script needs a little more line height to stay readable. */
:lang(ar) body { line-height: 1.7; }

/* Phones: the header wraps instead of squeezing logo, menu and languages side by side. */
@media (max-width: 40rem) {
  .site-header { flex-wrap: wrap; }
  .site-header .site-prefs { margin-inline-start: auto; }
  .site-header nav { order: 1; flex-basis: 100%; justify-content: flex-start; gap: 0.5rem 0.9rem; }
}

/* ---- Language and currency ---- */
.site-prefs { display: flex; align-items: center; gap: 0.75rem; }
/* First visit: a window in the middle of a dimmed page (JavaScript makes it a true modal). */
.welcome-box {
  position: fixed; inset: 0; margin: auto; z-index: 1000; box-sizing: border-box;
  width: min(28rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; height: fit-content;
  padding: 1.5rem; background: #fff; color: var(--ink); border: 0; border-radius: 16px;
  box-shadow: 0 0 0 100vmax rgb(0 0 0 / 0.45), 0 12px 40px rgb(0 0 0 / 0.25);
}
.welcome-box::backdrop { background: rgb(0 0 0 / 0.45); }
.welcome-box:modal { box-shadow: 0 12px 40px rgb(0 0 0 / 0.25); }
.welcome-box h2 { margin: 0 0 0.25rem; font-size: 1.5rem; }
.welcome-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.welcome-form label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; }
.welcome-form select { min-height: 48px; font-size: 1rem; }
.welcome-form input[type=submit] { min-height: 48px; font-size: 1.05rem; }
.converted-note { font-size: 0.8rem; }

/* ---- Phone-first seller screens: big tap targets ---- */
.big-button, .form input[type="submit"].big-button { min-height: 3rem; font-size: 1.05rem; padding: 0.75rem 1.25rem; }
.step-heading { font-size: 1.15rem; margin: 1rem 0 0.5rem; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.75rem; }
.tile {
  display: flex; align-items: center; justify-content: center; min-height: 4.5rem; padding: 0.75rem;
  text-align: center; font-weight: 700; color: var(--ink); text-decoration: none;
  background: #fff; border: 2px solid var(--line); border-radius: 10px;
}
.tile:hover, .tile:focus-visible { border-color: var(--brand); background: #fff8f7; }
.yard-card { align-items: center; }
.section-tile { flex-direction: column; gap: 0.3rem; min-height: 6.5rem; }
.assembly { margin-bottom: 1.25rem; }
.part-card.listed { border-color: #067647; }
.part-card.draft { border-color: #f79009; }
.part-form { max-width: none; gap: 0.5rem; margin-top: 0.5rem; }
.grade-picker { display: grid; gap: 0.4rem; border: 0; padding: 0; margin: 0; }
.grade-picker legend { font-weight: 600; margin-bottom: 0.25rem; }
.form .grade-option { display: flex; gap: 0.6rem; align-items: center; min-height: 3rem; padding: 0.4rem 0.75rem;
  font-weight: normal; margin: 0; border: 2px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.grade-option:has(input:checked) { border-color: var(--brand); background: #fff8f7; }
.grade-option input { width: 1.25rem; height: 1.25rem; accent-color: var(--brand); }
.photos { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.photo-thumb-small { width: 4.5rem; height: 4.5rem; object-fit: cover; border-radius: 6px; }
.take-photo { display: inline-flex; align-items: center; min-height: 3rem; }
.have-it { margin-top: 0.4rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.steps { padding-inline-start: 1.25rem; }
.steps li { margin-bottom: 0.35rem; }
.photo-choice { display: inline-block; }
.photo-choice summary { list-style: none; cursor: pointer; }
.photo-choice summary::-webkit-details-marker { display: none; }
.photo-options { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.photo-options label { display: inline-flex; align-items: center; }

/* Sub-categories (Brakes -> Front brakes) as tappable chips that wrap on phones */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border: 1px solid var(--line);
        border-radius: 999px; background: #fff; color: inherit; text-decoration: none; }
.chip[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* Specifications and part numbers on the part page */
.specs { border-collapse: collapse; width: 100%; max-width: 32rem; margin-bottom: 1rem; }
.specs th, .specs td { text-align: start; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { font-weight: normal; color: var(--muted); width: 50%; }
.specs td { overflow-wrap: anywhere; }
.brand { font-weight: 600; }

/* Cookie banner (Google Analytics only after "Accept") and the footer link to change it */
.cookie-consent { position: fixed; inset-inline: 0; bottom: 0; z-index: 50; margin: 0 auto; max-width: 48rem;
                  background: #fff; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0;
                  box-shadow: 0 -4px 16px rgb(0 0 0 / 0.12); padding: 1rem 1.25rem; }
.cookie-consent[hidden] { display: none; }
.cookie-consent h2 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.cookie-consent p { margin: 0 0 0.75rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cookie-actions button { min-height: 44px; flex: 1 1 8rem; }
.site-footer .link-button { min-height: 44px; }

/* ---- Home page: picker beside the sliding banner, then showcase sections ---- */
.container.wide { max-width: 72rem; }
.home-top { display: grid; gap: 1rem; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); align-items: stretch; }
@media (max-width: 52rem) { .home-top { grid-template-columns: minmax(0, 1fr); } }
.home-picker { display: flex; flex-direction: column; gap: 0.75rem; }
.home-picker h1 { font-size: 1.5rem; line-height: 1.25; margin: 0; }
.home-picker .small-heading { font-size: 1rem; margin: 0; }
.home-picker-form { display: flex; flex-direction: column; gap: 0.5rem; }
.home-picker-form .picker-field { display: flex; flex-direction: column; gap: 0.25rem; }
.home-picker-form select, .home-picker-form .button { width: 100%; min-height: 44px; }
.home-section { margin-top: 2.5rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 0.75rem; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 0.75rem; }
.shop-tile { display: flex; flex-direction: column; gap: 0.2rem; color: inherit; text-decoration: none; }

/* Sliding banner: a sideways strip that snaps to each slide (native swipe on phones) */
.slider { position: relative; display: flex; flex-direction: column; min-width: 0; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 12px; flex: 1; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
         padding: 2rem 1.75rem; min-height: 16rem; color: #fff; text-decoration: none; box-sizing: border-box; }
.slide-1 { background: linear-gradient(135deg, #b42318, #d92d20 60%, #f04438); }
.slide-2 { background: linear-gradient(135deg, #1d2433, #344054); }
.slide-3 { background: linear-gradient(135deg, #0e7090, #088ab2); }
.slide-4 { background: linear-gradient(135deg, #4a1fb8, #6938ef); }
.slide-text { display: flex; flex-direction: column; gap: 0.6rem; max-width: 26rem; }
.slide-text strong { font-size: 1.6rem; line-height: 1.2; }
.slide-cta { display: inline-block; align-self: flex-start; background: #fff; color: var(--ink); font-weight: 600;
             padding: 0.6rem 1rem; border-radius: 999px; min-height: 44px; box-sizing: border-box; line-height: 1.6; }
.slide-art { flex: none; width: 7.5rem; height: 7.5rem; background: #fff; border-radius: 50%; padding: 1rem; box-sizing: border-box; }
@media (max-width: 30rem) { .slide-art { display: none; } .slide-text strong { font-size: 1.35rem; } .slide { min-height: 13rem; } }
.slider-controls { display: flex; align-items: center; justify-content: center; gap: 0.25rem; margin-top: 0.5rem; }
.slider-button { min-width: 44px; min-height: 44px; background: none; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 1.1rem; cursor: pointer; }
.dots { display: flex; }
.dot { width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; padding: 0; }
.dot::after { content: ""; position: absolute; inset: 0; margin: auto; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dot[aria-current="true"]::after { background: var(--brand); width: 22px; border-radius: 999px; }
[dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }

/* Guides: a large featured guide beside a short list */
.guides-layout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 52rem) { .guides-layout { grid-template-columns: minmax(0, 1fr); } }
.guide-featured { display: flex; flex-direction: column; gap: 0.5rem; color: inherit; text-decoration: none; }
.guide-featured strong { font-size: 1.25rem; }
.guide-list { display: flex; flex-direction: column; gap: 0.75rem; }
.guide-card { display: flex; gap: 0.75rem; align-items: flex-start; color: inherit; text-decoration: none; }
.guide { max-width: 42rem; }
.guide .lead { font-size: 1.1rem; }
.help-topic h2 { font-size: 1.15rem; margin-bottom: 0.25rem; }

/* Footer on every page */
.site-footer { margin-top: 3rem; padding: 2rem 1.25rem; background: #fff; border-top: 1px solid var(--line); }
.footer-columns { max-width: 72rem; margin: 0 auto; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.site-footer h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-block; padding: 0.55rem 0; }
.pay-cards { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pay-card { border: 1px solid var(--line); border-radius: 6px; padding: 0.2rem 0.5rem; font-size: 0.8rem; font-weight: 600; }
.footer-bottom { max-width: 72rem; margin: 1.5rem auto 0; text-align: center; }

/* Front door: "What do you need a spare part for?" and the industries. */
.welcome-hero { text-align: center; max-width: 46rem; margin: 1.5rem auto 2rem; }
.welcome-hero h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); line-height: 1.15; margin-bottom: 0.5rem; }
.hero-search { max-width: 40rem; margin: 1.25rem auto 0; }
.hero-search input[type=search], .hero-search input[type=text] { min-height: 52px; font-size: 1.05rem; }
.industry-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); }
.industry-tile { box-sizing: border-box; display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; height: 100%;
  padding: 1rem; border: 1px solid var(--line, #ddd); border-radius: 14px; background: #fff;
  color: var(--ink); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s; }
.industry-tile:hover, .industry-tile:focus-visible { border-color: var(--ink); box-shadow: 0 4px 14px rgb(0 0 0 / 0.08); }
.industry-tile .industry-icon { width: 60px; height: 60px; padding: 10px; border-radius: 18px;
  background: color-mix(in srgb, var(--tint) 45%, #fff); }
/* The tiles' drawings: each machine made of its own parts (industries/_cutaway, PartArtHelper). */
.industry-cutaway { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; padding: 0.3rem; box-sizing: border-box;
  border-radius: 10px; background: color-mix(in srgb, var(--tint) 30%, #fff); }
.part-art .metal1 { fill: #f2f4f7; stroke: #667085; stroke-width: 0.5; }
.part-art .metal2 { fill: #d0d5dd; stroke: #475467; stroke-width: 0.5; }
.part-art .metal3 { fill: #667085; stroke: #344054; stroke-width: 0.4; }
.part-art .tyre { fill: #1d2939; }
.part-art .ink { fill: currentColor; }
.part-art .amber { fill: #f79009; }
.part-art .white { fill: #fff; stroke: #98a2b3; stroke-width: 0.4; }
.part-art .ln { fill: none; }
.part-art .lk { stroke: #344054; }
.part-art .lc { stroke: currentColor; }
.part-art .lm { stroke: #98a2b3; }
.part-art .lw { stroke: #fff; }
.part-art .dash { stroke-dasharray: 2.2 1.2; }
.industry-icon .t { fill: var(--tint); }
.industry-icon .w { fill: #fff; }
.industry-icon .d { fill: currentColor; }
.industry-name { font-weight: 700; }
.industry-bar { display: flex; gap: 1.5rem; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin;
  padding: 0.25rem 0 0.5rem; margin: 0 0 1.25rem; border-bottom: 1px solid var(--line, #ddd); }
.industry-bar-item { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  min-width: 4.5rem; min-height: 44px; padding-bottom: 0.4rem; color: var(--muted); text-decoration: none;
  font-size: 0.8rem; text-align: center; border-bottom: 2px solid transparent; }
.industry-bar-item .industry-icon { width: 28px; height: 28px; }
.industry-bar-item:hover { color: var(--ink); }
.industry-bar-item.current { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }
.steps { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); padding-inline-start: 1.25rem; }
.coming-soon { flex-direction: column; align-items: center; gap: 0.25rem; max-width: 46rem; margin: 0 auto 2rem; text-align: center; }
.coming-soon h2, .coming-soon p { margin: 0.25rem 0; }
@media (prefers-reduced-motion: reduce) { .industry-tile { transition: none; } }

/* App banner: our own drawn phone floats over a coloured strip; its shadow shrinks as it rises */
.app-banner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  margin: 3.5rem 0 2rem; padding: 2rem 2rem; border-radius: 1.25rem; color: #fff;
  background: linear-gradient(120deg, #b42318, #d92d20 55%, #f97066); }
.app-banner-text { max-width: 32rem; }
.app-banner h2 { margin: 0.4rem 0; font-size: 1.8rem; line-height: 1.2; }
.app-banner p { margin: 0.4rem 0; }
.app-banner-soon { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 999px; background: rgb(255 255 255 / .2);
  font-size: 0.85rem; font-weight: 600; }
.app-banner-points { margin: 0.75rem 0; padding-inline-start: 1.2rem; }
.app-banner-points li { margin: 0.25rem 0; }
.app-banner-stores { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.store-pill { display: inline-block; padding: 0.55rem 1rem; border-radius: 0.6rem; background: #1d2433; color: #fff;
  font-weight: 600; font-size: 0.95rem; }
.app-banner-art { position: relative; flex: none; width: 17rem; align-self: stretch; min-height: 16rem; }
.app-banner-phone { position: absolute; inset-inline-start: 2.25rem; bottom: 1.4rem; font-size: 10px;
  animation: app-phone-float 3.4s ease-in-out infinite; }
.app-banner-shadow { position: absolute; inset-inline-start: 3rem; bottom: 0.2rem; width: 11rem; height: 1.1rem;
  border-radius: 50%; background: rgb(0 0 0 / .4); filter: blur(6px); animation: app-shadow-breathe 3.4s ease-in-out infinite; }
@keyframes app-phone-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes app-shadow-breathe { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.78); opacity: .5; } }
@media (min-width: 40.01rem) { .app-banner { margin-top: 11rem; } }
@media (max-width: 40rem) {
  .app-banner { flex-direction: column; align-items: stretch; padding: 1.5rem 1.25rem; margin-top: 2rem; }
  .app-banner h2 { font-size: 1.5rem; }
  .app-banner-art { width: 100%; min-height: 0; padding-bottom: 1.6rem; }
  .app-banner-phone { position: relative; inset: auto; width: max-content; margin: 0.5rem auto 0; font-size: 8.5px; }
  .app-banner-shadow { inset-inline-start: calc(50% - 5.5rem); }
}
@media (prefers-reduced-motion: reduce) { .app-banner-phone, .app-banner-shadow { animation: none; } }

/* The realistic phone: metal frame, side buttons, camera island, glass shine, slight turn.
   Sized in em so one font-size scales the whole phone. */
.real-phone { position: relative; width: 26em; height: 52em; padding: 0.75em; box-sizing: border-box; border-radius: 3.9em;
  background: linear-gradient(135deg, #e5e7eb 0%, #6b7280 18%, #1f2937 45%, #4b5563 72%, #d1d5db 100%);
  box-shadow: inset 0 0 0 0.18em rgb(255 255 255 / .35), inset 0 0 0 0.45em #0b0f17, 0 2.2em 3em rgb(0 0 0 / .35);
  transform: perspective(90em) rotateY(-13deg) rotateX(3deg) rotateZ(2deg); }
[dir=rtl] .real-phone { transform: perspective(90em) rotateY(13deg) rotateX(3deg) rotateZ(-2deg); }
.real-phone::before, .real-phone::after { content: ""; position: absolute; inset-inline-end: -0.35em; width: 0.4em; border-radius: 0.3em;
  background: linear-gradient(90deg, #374151, #9ca3af); }
.real-phone::before { top: 9em; height: 5em; }
.real-phone::after { top: 15.5em; height: 3em; }
.real-phone-screen { position: relative; height: 100%; overflow: hidden; border-radius: 3.2em; background: #f5f6f8; color: #1d2433;
  font: 1em/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-align: start; }
.real-phone-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgb(255 255 255 / .28) 0%, rgb(255 255 255 / .08) 32%, transparent 33%); }
.rp-island { position: absolute; top: 0.9em; left: 50%; width: 6.6em; height: 2em; margin-left: -3.3em; border-radius: 2em; background: #000; z-index: 2; }
.rp-status { display: flex; justify-content: space-between; align-items: center; padding: 1.2em 2.4em 0.6em 2.8em; font-weight: 700; font-size: 1.15em;
  background: #d92d20; color: #fff; }
.rp-status-icons { display: flex; gap: 0.35em; align-items: center; }
.rp-status-icons svg { height: 0.85em; width: auto; fill: currentColor; }
.rp-appbar { display: flex; justify-content: space-between; align-items: center; padding: 0.5em 1.4em 1em; background: #d92d20; color: #fff; }
.rp-logo { font-weight: 800; font-size: 1.7em; letter-spacing: -0.02em; }
.rp-cart { position: relative; display: flex; }
.rp-cart svg { width: 2.2em; height: 2.2em; fill: currentColor; }
.rp-cart b { position: absolute; top: -0.4em; inset-inline-end: -0.5em; min-width: 1.4em; height: 1.4em; border-radius: 1em; background: #fff;
  color: #d92d20; font-size: 0.85em; display: grid; place-items: center; }
.rp-search { display: flex; align-items: center; gap: 0.6em; margin: -0.2em 1.2em 0; padding: 0.85em 1em; border-radius: 1em; background: #fff;
  box-shadow: 0 0.3em 0.9em rgb(16 24 40 / .12); font-size: 1.1em; color: #344054; position: relative; }
.rp-search svg { width: 1.2em; height: 1.2em; color: #667085; flex: none; }
.rp-vehicle { display: flex; align-items: center; gap: 0.8em; margin: 1em 1.2em 0; padding: 0.8em 1em; border-radius: 1em;
  background: #ecfdf3; border: 0.1em solid #abefc6; font-size: 0.95em; color: #475467; }
.rp-vehicle strong { color: #1d2433; font-size: 1.1em; white-space: nowrap; }
.rp-car-dot { width: 2.4em; height: 2.4em; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 30%, #fff, #e4e7ec 60%, #98a2b3);
  box-shadow: inset 0 0 0 0.15em #fff; }
.rp-change { margin-inline-start: auto; color: #b42318; font-weight: 700; }
.rp-chips { display: flex; gap: 0.5em; margin: 1em 1.2em 0; }
.rp-chips span { padding: 0.4em 0.9em; border-radius: 1em; background: #fff; border: 0.1em solid #e4e7ec; font-size: 0.95em; white-space: nowrap; }
.rp-chips .on { background: #1d2433; color: #fff; border-color: #1d2433; }
.rp-count { margin: 1em 1.4em 0.5em; font-size: 0.95em; color: #667085; font-weight: 600; }
.rp-card { display: flex; gap: 0.8em; align-items: center; margin: 0 1.2em 0.7em; padding: 0.7em; border-radius: 1.1em; background: #fff;
  box-shadow: 0 0.2em 0.6em rgb(16 24 40 / .08); }
.rp-photo { width: 5.2em; height: 5.2em; flex: none; border-radius: 0.8em; display: grid; place-items: center;
  background: linear-gradient(160deg, #ffffff, #e9edf2); }
.rp-photo svg { width: 92%; height: 92%; }
.rp-info { display: flex; flex-direction: column; gap: 0.15em; min-width: 0; font-size: 0.95em; }
.rp-info strong { font-size: 1.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-fit { color: #067647; font-weight: 600; font-size: 0.9em; }
.rp-cond { align-self: flex-start; white-space: nowrap; padding: 0.05em 0.5em; border-radius: 0.5em; background: #fef0c7; color: #93370d; font-size: 0.85em; font-weight: 600; }
.rp-shop { color: #667085; font-size: 0.9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-price { margin-inline-start: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 0.4em; }
.rp-price strong { font-size: 1.2em; white-space: nowrap; }
.rp-add { width: 1.9em; height: 1.9em; border-radius: 50%; background: #d92d20; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.1em; }
.rp-tabs { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-around; padding: 0.8em 0.6em 2.4em;
  background: #fff; border-top: 0.1em solid #e4e7ec; font-size: 0.85em; color: #98a2b3; }
.rp-tabs span { display: flex; flex-direction: column; align-items: center; gap: 0.2em; }
.rp-tabs svg { width: 2.2em; height: 2.2em; fill: currentColor; }
.rp-tabs .on { color: #d92d20; font-weight: 700; }
.rp-home-bar { position: absolute; bottom: 0.8em; left: 50%; width: 10em; height: 0.45em; margin-left: -5em; border-radius: 1em; background: #1d2433; }

/* Seller invitation near the top of the front door: one band, text beside the buttons on wide screens */
.join-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem;
  padding: 1rem 1.25rem; border-radius: 14px; background: #fff4ed; border: 1px solid #fedfcc; margin-top: 1rem; }
.join-top h2 { margin: 0 0 0.2rem; font-size: 1.2rem; }
.join-top p { margin: 0; }
.join-top .cta { margin: 0; }

/* Top bar: plain links, then Sign up and Sell on Spareware as buttons, then language and currency */
.site-header nav { flex: 1; justify-content: flex-end; }
.site-header nav > a:not(.button) { color: var(--ink); font-weight: 600; text-decoration: none; }
.site-header nav > a:not(.button):hover { color: var(--brand-dark); text-decoration: underline; }
a.sell-button { display: inline-flex; align-items: center; gap: 0.4rem; background: #fff; color: var(--brand-dark);
  border: 2px solid var(--brand); }
a.sell-button:hover { background: #fff4ed; }
@media (max-width: 40rem) {
  .site-header { row-gap: 0.6rem; }
  .site-header nav { flex-basis: 100%; justify-content: flex-start; gap: 0.5rem 0.75rem; }
  .site-header nav > .button { padding: 0.45rem 0.7rem; font-size: 0.95rem; }
  a.sell-button svg { width: 16px; height: 16px; }
  a.sell-button .wide-only { display: none; }
}
a.sell-button .narrow-only { display: none; }
@media (max-width: 40rem) { a.sell-button .narrow-only { display: inline; } }

/* Person button: one round icon that opens Log in / Sign up */
.account-menu { position: relative; }
.account-button { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; box-sizing: border-box;
  border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.account-button::-webkit-details-marker { display: none; }
.account-button:hover, .account-menu[open] .account-button { border-color: var(--ink); box-shadow: 0 2px 8px rgb(0 0 0 / .12); }
.account-menu-panel { position: absolute; top: calc(100% + 0.5rem); inset-inline-end: 0; z-index: 20; display: flex; flex-direction: column;
  gap: 0.5rem; min-width: 12rem; padding: 0.75rem; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 24px rgb(16 24 40 / .16); }
.account-menu-panel .button { text-align: center; }
@media (max-width: 40rem) { .account-menu-panel { inset-inline-end: auto; inset-inline-start: 0; } }

/* Category page: sub-categories as tiles; industry pages: categories as cards with their sub-categories */
.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; color: var(--muted); margin: 0 0 0.5rem; }
.subcategory-grid { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); }
.subcategory-tile { box-sizing: border-box; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem;
  padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-decoration: none; min-height: 44px; }
.subcategory-tile:hover, .subcategory-tile:focus-visible { border-color: var(--ink); box-shadow: 0 4px 14px rgb(0 0 0 / .08); }
.subcategory-tile .industry-icon { width: 40px; height: 40px; }
.subcategory-name { font-weight: 700; }
.category-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.category-card { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.category-card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.category-card h3 a { color: var(--ink); text-decoration: none; }
.category-card ul { list-style: none; padding: 0; margin: 0 0 0.5rem; display: grid; gap: 0.15rem; }
.category-card ul a { color: var(--muted); text-decoration: none; display: inline-block; padding: 0.2rem 0; }
.category-card ul a:hover { color: var(--brand-dark); text-decoration: underline; }

/* Aircraft / boat engine / boat pickers on the aviation and marine pages (industries/_craft_picker). */
.craft-pickers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 30rem)); justify-content: center; gap: 1rem; margin: 1.5rem 0; }
.craft-picker { display: block; margin: 0; }
.craft-picker h2 { margin: 0 0 0.25rem; }
.craft-picker .picker { flex-direction: column; align-items: stretch; margin-bottom: 0; }
.craft-picker select, .craft-picker .button { width: 100%; min-height: 44px; }

/* Feedback banner under the header (shared/_feedback_banner) and its form (/feedback/new) */
.feedback-banner { display: flex; align-items: center; justify-content: center; gap: 0.5rem;
                   padding: 0.35rem 0.75rem; background: #eff4ff; color: #1d2939; border-bottom: 1px solid #d1e0ff;
                   font-size: 0.9rem; }
.feedback-banner p { margin: 0; text-align: center; }
.feedback-banner .feedback-link { font-weight: 600; white-space: nowrap; }
.feedback-close { flex: none; min-width: 44px; min-height: 44px; padding: 0; border: 0; background: none;
                  color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.feedback-kinds { display: flex; flex-wrap: wrap; gap: 0.5rem; border: 0; padding: 0; margin: 0; }
.feedback-kinds legend { font-weight: 600; margin-bottom: 0.5rem; }
.feedback-kind { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 44px; padding: 0 1rem;
                 border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer;
                 font-weight: normal !important; margin: 0 !important; }
.feedback-kind input { accent-color: var(--brand); }
.feedback-kind:has(input:checked) { border-color: var(--brand); background: #fff8f7; }
.feedback-form { max-width: 40rem; }
.feedback-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.feedback-item { display: block; }
.feedback-item p { margin: 0.25rem 0; }
.feedback-message { white-space: pre-line; overflow-wrap: anywhere; }
.pager { display: flex; gap: 1rem; margin-top: 1rem; }

/* "Ask Spareware" chatbot: round button on every page, and the chat page (/chat) */
.chat-button { position: fixed; inset-inline-end: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 40;
               display: inline-flex; align-items: center; gap: 0.5rem; min-width: 56px; min-height: 56px;
               padding: 0 1.1rem; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none;
               font-weight: 600; box-shadow: 0 6px 18px rgb(0 0 0 / 0.25); justify-content: center; }
.chat-button:hover { background: #000; }
@media (max-width: 40rem) { .chat-button { padding: 0; } .chat-button-text { display: none; } }
.chat { display: flex; flex-direction: column; gap: 0.75rem; max-width: 48rem; }
.chat-messages { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.chat-bubble { max-width: min(36rem, 88%); padding: 0.65rem 0.9rem; border-radius: 14px; overflow-wrap: anywhere; }
.chat-bubble p { margin: 0 0 0.5rem; }
.chat-bubble p:last-child { margin-bottom: 0; }
.chat-bubble.from-user { align-self: flex-end; background: var(--ink); color: #fff; white-space: pre-line;
                         border-end-end-radius: 4px; }
.chat-bubble.from-assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line);
                              border-end-start-radius: 4px; }
.chat-bubble.chat-failed { background: #fef3f2; border-color: #fecdca; }
.chat-examples { margin: 0.5rem 0 0; padding-inline-start: 1.1rem; color: var(--muted); }
.chat-dots { display: inline-flex; gap: 4px; }
.chat-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: chat-dot 1.2s infinite ease-in-out; }
.chat-dots span:nth-child(2) { animation-delay: 0.15s; }
.chat-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-dots span { animation: none; opacity: 0.6; } }
.chat-form { display: flex; flex-direction: column; gap: 0.5rem; }
.chat-form textarea { width: 100%; box-sizing: border-box; font: inherit; }
.chat-form input[type="submit"] { align-self: flex-end; }

/* Category and sub-category icons for every industry (CatalogIconsHelper) */
.catalog-icon { flex: none; display: block; }
.category-heading { display: flex; align-items: center; gap: 0.75rem; }
.category-heading img, .category-heading svg { flex: none; }
.category-card .category-card-title { display: flex; align-items: center; gap: 0.6rem; }
.footer-owner { margin-top: 0.25rem; font-size: 0.78rem; text-align: center; }
