/* ==========================================================================
   Carspace design tokens
   One brand palette, applied on top of MDB/Bootstrap utility classes so
   every existing bg-*/text-*/border-*/btn-* class resolves to an on-brand
   color instead of a mix of Bootstrap defaults + ad-hoc hex values.
   - Brand green  -> primary identity (nav, footer, links, "success")
   - Brand amber  -> single call-to-action color (Sell, Subscribe, Boost...)
   Stray Bootstrap blue (`primary`) is remapped to brand green so it can
   never reappear as an off-brand accent.
   ========================================================================== */
body {
  background-color: #f4f5f9;
}

/* Brand identity: remap Bootstrap "primary" (default blue) to brand green */
.btn-primary {
  background-color: #0f8b5f !important;
  border-color: #0f8b5f !important;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: #0b6b49 !important;
  border-color: #0b6b49 !important;
}
.bg-primary { background-color: #0f8b5f !important; }
.text-primary { color: #0f8b5f !important; }
.border-primary { border-color: #0f8b5f !important; }

/* MDB nav-pills/nav-tabs default to Bootstrap blue for the active tab
   (e.g. the login/sign-up tabs) — pin that to brand green too */
.nav-pills .nav-link.active, .nav-pills .show > .nav-link,
.nav-tabs .nav-link.active {
  background-color: #0f8b5f !important;
  color: #fff !important;
}

/* Brand identity: pin "success" (nav, footer, links) to the same brand green */
.btn-success {
  background-color: #0f8b5f !important;
  border-color: #0f8b5f !important;
}
.btn-success:hover, .btn-success:focus {
  background-color: #0b6b49 !important;
  border-color: #0b6b49 !important;
}
.bg-success { background-color: #0f8b5f !important; }
.text-success { color: #0f8b5f !important; }
.border-success { border-color: #0f8b5f !important; }

/* Single call-to-action color: every "Sell/Subscribe/Boost" button uses this
   instead of alternating between warning-amber and success-green */
.btn-warning, .bg-warning {
  background-color: #f2a900 !important;
  border-color: #f2a900 !important;
  color: #1c1f23 !important;
}
.btn-warning:hover, .btn-warning:focus {
  background-color: #cc8f00 !important;
  border-color: #cc8f00 !important;
}
.text-warning { color: #cc8f00 !important; }

/* Used across marketing sections (index.html feature icons) but was never
   defined, so icon badges rendered with no background at all */
.bg-success-light {
  background-color: #e6f5ef !important;
}

.txt-red {
  color: red !important;
}

.bag-red {
  background-color: red !important;
}

.icon-hover:hover {
    border-color: #090909 !important;
    background-color: white !important;
  }
  
  .icon-hover:hover i {
    color: #090909 !important;
  }

  .icon-hover-danger:hover {
    border-color: #dc4c64 !important;
    background-color: white !important;
  }
  
  .icon-hover-danger:hover i {
    color: #dc4c64 !important;
  }

  @media (max-width: 400px) {
    .prod-desc {
      display: none;
    }
  }

  .focus-grid a {
    text-decoration:none;
  }
  .focus-grid {
      margin-top: 30px;
  }
  .focus-grid h4{
    text-align:left;
      font-size: 2.5em;
      font-weight: 400;
      color: #323232;
  }
  .focus-grid h4 span {
    display: block;
    font-size: 0.5em;
    margin: 10px 0;
    transition:0.5s all;
    -webkit-transition:0.5s all;
    -moz-transition:0.5s all;
    -o-transition:0.5s all;
    -ms-transition:0.5s all;
  }
  .focus-grid p {
    margin: 20px 0 0px 0;
      font-size: 1.2em;
      color: #797979;
      font-weight: 300;
      line-height: 1.9em;
  }

  a {
    text-decoration: none!important;
  }

  .force-scroll {

    overflow-y: scroll;
    
    height: 300px;
    
    }



/* Green label for all form controls */
.form-outline .form-label {
  color: grey !important; /* Success color (green) */
}

/* Green notch effect on focus */
.form-outline .form-control:focus ~ .form-notch .form-notch-leading,
.form-outline .form-control:focus ~ .form-notch .form-notch-middle,
.form-outline .form-control:focus ~ .form-notch .form-notch-trailing {
  border-color: #28a745 !important;
}

/* Green border & shadow on focus */
.form-outline .form-control:focus {
  border-color: #28a745 !important;
  box-shadow: none !important;
}

/* For select dropdowns (if using) */
/* .form-outline .form-select:focus {
  border-color: #32c755 !important;
  box-shadow: none !important;
} */


/* ==========================================================================
   Design system v2 — buttons, forms, dropdowns, badges
   Brand palette stays at exactly 2 button fills:
     - green  (.btn-primary/.btn-success)  -> main actions
     - amber  (.btn-warning)                -> the single CTA accent
   Every other "outline/secondary/light/dark/purple" button in the codebase
   collapses onto one neutral outline style below, so no page ever shows a
   3rd brand color. Red is kept only as a semantic state for destructive
   actions (delete / cancel), never as a brand accent.
   ========================================================================== */
/* ---- Base button shape ---- */
.btn {
  border-radius: 8px;
  font-weight: 500;
}
.btn-lg { border-radius: 10px; }
.btn:focus, .btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(15, 139, 95, 0.18) !important;
}

/* ---- The one neutral outline style ----
   btn-outline-warning/secondary/purple/dark, btn-secondary and btn-light all
   render identically: a plain neutral outline that tints green on hover.
   This is what replaces every stray orange/bootstrap-warning outline. */
.btn-outline-warning,
.btn-outline-secondary,
.btn-outline-purple,
.btn-outline-dark,
.btn-secondary,
.btn-light {
  background-color: #fff !important;
  border-color: #d7dce2 !important;
  color: #1c1f23 !important;
}
.btn-outline-warning:hover, .btn-outline-warning:focus,
.btn-outline-secondary:hover, .btn-outline-secondary:focus,
.btn-outline-purple:hover, .btn-outline-purple:focus,
.btn-outline-dark:hover, .btn-outline-dark:focus,
.btn-secondary:hover, .btn-secondary:focus,
.btn-light:hover, .btn-light:focus {
  background-color: #e6f5ef !important;
  border-color: #0f8b5f !important;
  color: #0b6b49 !important;
}
.btn-secondary:disabled, .btn-light:disabled,
.btn-secondary[disabled], .btn-light[disabled] {
  background-color: #eef0f3 !important;
  border-color: #d7dce2 !important;
  color: #6c757d !important;
  opacity: 1;
}

/* Neutral/light-outline buttons placed on the green hero/footer background
   need to read as light, not disappear as near-invisible white-on-white */
.bg-success .btn-outline-light,
.bg-success .btn-outline-white {
  background-color: transparent !important;
  border-color: rgba(255, 255, 255, 0.75) !important;
  color: #fff !important;
}
.bg-success .btn-outline-light:hover,
.bg-success .btn-outline-white:hover {
  background-color: #fff !important;
  border-color: #fff !important;
  color: #0b6b49 !important;
}
.bg-success .btn-light,
.bg-success .btn-light:hover {
  background-color: #fff !important;
  border-color: #fff !important;
  color: #0b6b49 !important;
}

/* ---- Destructive actions: the only other color allowed, reserved
   strictly for delete / cancel-subscription controls ---- */
.btn-danger {
  background-color: #e0455a !important;
  border-color: #e0455a !important;
}
.btn-danger:hover, .btn-danger:focus {
  background-color: #c53249 !important;
  border-color: #c53249 !important;
}
.btn-outline-danger {
  background-color: #fff !important;
  border-color: #e0455a !important;
  color: #e0455a !important;
}
.btn-outline-danger:hover, .btn-outline-danger:focus {
  background-color: #e0455a !important;
  border-color: #e0455a !important;
  color: #fff !important;
}

/* Gallery/carousel nav controls are chrome, not a CTA — never brand-amber */
.gallery-nav-btn {
  background: rgba(28, 31, 35, 0.55) !important;
  border: none !important;
  color: #fff !important;
}
.gallery-nav-btn:hover, .gallery-nav-btn:focus {
  background: rgba(28, 31, 35, 0.8) !important;
  color: #fff !important;
}

/* ---- Legacy Bootstrap 4 badge modifiers ----
   badge-success/secondary/light/warning/danger don't exist in Bootstrap 5;
   without this they render as bare unstyled text (no pill, no background)
   on every product card's condition badge and status pills. */
.badge-secondary, .badge-light, .badge-success, .badge-warning, .badge-danger {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 600;
  border-radius: 50rem;
}
.badge-secondary { background-color: #eef0f3; color: #495057; }
.badge-light { background-color: #f4f5f9; color: #495057; }
.badge-success { background-color: #e6f5ef; color: #0b6b49; }
.badge-warning { background-color: #fdf3dd; color: #cc8f00; }
.badge-danger { background-color: #fde8ea; color: #c53249; }

/* Restore the intended soft tint for bg-success/bg-primary + bg-opacity-*
   combos (icon circles, "Listings"/"Member since" badges) — the plain
   .bg-success/.bg-primary rules above are solid fills and were clobbering
   the opacity utility entirely, so these read as harsh solid green instead
   of a soft tint. Higher-specificity compound selector wins over both. */
.bg-success.bg-opacity-10, .bg-primary.bg-opacity-10,
.bg-success.bg-opacity-25, .bg-primary.bg-opacity-25 {
  background-color: #e6f5ef !important;
}
.bg-warning.bg-opacity-10, .bg-warning.bg-opacity-25 {
  background-color: #fdf3dd !important;
}

/* Rainbow stat-icon cleanup: info/secondary collapse to one neutral slate
   tone instead of bright cyan, so dashboard icon badges read as
   green / amber / neutral — never a 4th or 5th hue. */
.bg-info { background-color: #6c757d !important; }
.bg-info-subtle { background-color: #eef0f3 !important; }
.text-info { color: #495057 !important; }
.text-purple { color: #0f8b5f !important; }

/* ---- Forms & selects: one sleek system everywhere ---- */
.form-select, .form-control {
  border-radius: 8px;
  border-color: #d7dce2;
}
.form-select:focus, .form-control:focus {
  border-color: #0f8b5f !important;
  box-shadow: 0 0 0 3px rgba(15, 139, 95, 0.12) !important;
}

/* Real <select> elements always get a clean minimal chevron, even the ones
   carrying the legacy "no-arrow" class used for the pill filter selects —
   without an arrow they looked like inert badges, not dropdowns. */
select.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 13px;
  padding-right: 2.25rem !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}
/* The "applied filter" chip is a <span> mimicking a select — it never gets
   a chevron since it isn't actually one. */
span.form-select {
  background-image: none !important;
  display: inline-flex;
  align-items: center;
  cursor: default;
}

/* Filter selects on listing pages default to a neutral border and only
   pick up brand green on focus, so an untouched filter doesn't look
   "already active" next to ones the user actually picked. */
select.form-select.border-success {
  border-color: #d7dce2 !important;
}
select.form-select.border-success:focus {
  border-color: #0f8b5f !important;
}

/* ---- Account/nav dropdown menus ---- */
.dropdown-menu {
  border: 1px solid #d7dce2;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(20, 24, 33, 0.12);
  padding: 0.4rem;
}
.dropdown-item {
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}
.dropdown-item:hover, .dropdown-item:focus {
  background-color: #e6f5ef;
  color: #0b6b49;
}

/* ---- Searchable combo box (replaces overly-long native <select> lists,
   e.g. the vehicle Brand filter) ---- */
.cs-combo { position: relative; }
.cs-combo-trigger {
  position: relative;
  display: block;
  width: 100%;
  min-width: 130px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 1.9rem !important;
  /* it's a <button> carrying .form-select for consistent sizing/border —
     suppress Bootstrap's native select caret so only our own ::after
     chevron below shows (otherwise the two stack up side by side) */
  background-image: none !important;
}
/* Positioned absolutely (not laid out via flex next to the label) so a
   long selected label truncates with an ellipsis instead of wrapping the
   button onto a second line and pushing the chevron off to the side */
.cs-combo-trigger::after {
  content: "";
  position: absolute;
  right: 0.9rem;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid #6c757d;
  border-bottom: 2px solid #6c757d;
  transform: rotate(45deg);
}
.cs-combo-panel {
  display: none;
  /* the panel keeps its own left-aligned list even inside a centered block
     (e.g. the home hero), so it reads the same wherever it is opened */
  text-align: left;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1055;
  width: max(230px, 100%);
  background: #fff;
  border: 1px solid #d7dce2;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(20, 24, 33, 0.14);
  padding: 0.5rem;
}
.cs-combo.open .cs-combo-panel { display: block; }
.cs-combo-search {
  width: 100%;
  border: 1px solid #d7dce2;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}
.cs-combo-search:focus {
  outline: none;
  border-color: #0f8b5f;
  box-shadow: 0 0 0 3px rgba(15, 139, 95, 0.12);
}
.cs-combo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
}
.cs-combo-list li {
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
}
.cs-combo-list li:hover, .cs-combo-list li.cs-active {
  background: #e6f5ef;
  color: #0b6b49;
}
.cs-combo-list li.cs-hidden { display: none; }
.cs-combo-empty {
  display: none;
  padding: 0.5rem 0.6rem;
  font-size: 0.8rem;
  color: #6c757d;
}
/* Dependent combos (Model until a Make is picked, City until a State is
   picked) start empty and shouldn't invite a click that opens nothing */
.cs-combo.cs-disabled .cs-combo-trigger {
  background-color: #f4f5f9 !important;
  color: #6c757d !important;
  cursor: not-allowed;
}

/* ==========================================================================
   Toasts (Django messages)
   Same shape and placement as the easycata admin — pinned top-right, one
   rounded card per message, icon + text + close — using the Carspace palette
   so a toast reads as part of this product. Paired with
   templates/partials/toasts.html.
   ========================================================================== */
.cs-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: min(380px, calc(100vw - 40px));
  pointer-events: none;
}
.cs-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 0.9rem;
  border-radius: 10px;
  /* The hairline ring matters: a green success toast lands on the green header
     at this position, and drop shadow alone does not separate them. */
  box-shadow: 0 12px 28px rgba(20, 24, 33, 0.18),
              0 0 0 1px rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.45;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(14px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cs-toast.is-visible { opacity: 1; transform: none; }
.cs-toast.is-leaving { opacity: 0; transform: translateX(14px); }

.cs-toast-icon {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  font-size: 0.95rem;
}
.cs-toast-body { flex: 1 1 auto; }
.cs-toast-close {
  flex: 0 0 auto;
  padding: 0 0.15rem;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0.75;
  cursor: pointer;
}
.cs-toast-close:hover, .cs-toast-close:focus { opacity: 1; }

/* Brand palette, not Bootstrap's defaults */
.cs-toast.is-success { background-color: #0f8b5f; }
.cs-toast.is-error   { background-color: #c53249; }
.cs-toast.is-warning { background-color: #cc8f00; }
.cs-toast.is-info    { background-color: #343a40; }

@media (max-width: 575.98px) {
  /* Full-width under the header rather than a narrow card hugging the edge */
  .cs-toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* ---- Site brand in the header ----
   One line, always. The wordmark scales down on narrow screens rather than
   wrapping under its own icon. */
.site-brand h5 {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  line-height: 1.3;
}
@media (max-width: 767.98px) {
  .site-brand h5 { font-size: 1.05rem; }
}
@media (max-width: 390px) {
  .site-brand h5 { font-size: 0.95rem; }
}

/* ---- Top nav search bar: keep input+button corners merged into one
   pill instead of the input staying square while the button rounds
   (previously the input sat inside an extra .form-outline wrapper div,
   which broke Bootstrap's .input-group > :first-child/:last-child
   corner-rounding selectors) ---- */
.search-input-group {
  border-radius: 50px;
  overflow: hidden;
}
.search-input-group .form-control {
  border-top-left-radius: 50px !important;
  border-bottom-left-radius: 50px !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}
.search-input-group .btn {
  border-top-right-radius: 50px !important;
  border-bottom-right-radius: 50px !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

/* ==========================================================================
   Dashboard shell — page heads, stat tiles, status badges, empty states
   These were previously declared inside dealer_product_list.html's inline
   <style>, which meant `.empty-state` rendered completely unstyled on the
   five other dashboard pages that use it (messages, wishlist, ratings,
   reports, buyer dashboard). Shared here so every dashboard screen is the
   same product.
   ========================================================================== */

/* ---- Onboarding progress ----
   Green throughout: this is progress, not a warning. The amber CTA below the
   list is the only accent, so the eye lands on the one action being asked for
   rather than on the five-item list. */
.onboarding-card {
  border-left: 4px solid #0f8b5f !important;
}
.onboarding-percent {
  font-weight: 700;
  color: #0b6b49;
  font-variant-numeric: tabular-nums;
}
.onboarding-progress {
  height: 8px;
  border-radius: 50rem;
  background-color: #eef0f3;
}
.onboarding-progress .progress-bar {
  background-color: #0f8b5f;
  border-radius: 50rem;
  transition: width 0.4s ease;
}
.onboarding-wizard {
  max-width: 560px;
  margin: 0 auto;
}

/* ---- Page head: title left, primary action right ---- */
.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.dash-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: #1c1f23;
}
.dash-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  color: #6c757d;
}

/* ---- Stat tiles ----
   Number first, label under it: the figure is what a dealer scans for.
   Icon chips carry only three tones (green / amber / neutral) so a row of
   tiles reads as one set instead of a rainbow. */
.stat-card {
  display: block;
  height: 100%;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
a.stat-card:hover {
  border-color: #0f8b5f;
  box-shadow: 0 6px 18px rgba(20, 24, 33, 0.07);
}
.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* flex-shrink guard: in the horizontal wallet row this chip is a flex item
     next to a long label, and without it the square squashes into an oval. */
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
  background: #eef0f3;
  color: #495057;
}
.stat-icon.is-brand { background: #e6f5ef; color: #0b6b49; }
.stat-icon.is-accent { background: #fdf3dd; color: #cc8f00; }
.stat-value {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.1;
  color: #1c1f23;
  margin: 0;
}
.stat-label {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: #6c757d;
}
.stat-label .fa-info-circle {
  color: #adb5bd;
  cursor: help;
}

/* ---- Wallet row ----
   A full-bleed green slab put a wall of empty colour between the balance on
   the far left and the button on the far right, and it made money the loudest
   thing on the page. Soft brand tint instead: it still reads as "the money
   row" without shouting, and the content is grouped left with the action
   beside it rather than flung to opposite edges. */
.stat-card.is-feature {
  background: #e6f5ef;
  border-color: #cfe6da;
}
.stat-card.is-feature .stat-icon {
  background: #0f8b5f;
  color: #fff;
}
.stat-card.is-feature .stat-value { color: #0b6b49; }
.stat-card.is-feature .stat-label { color: #4a6b5d; }

/* Horizontal variant: icon + figure on the left, action right after it,
   so the row does not stretch to fill a 900px column. */
.stat-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  /* .stat-card carries height:100% so tiles in a grid row match heights. This
     one stands alone as a direct child of the stretched .col-lg-9, where 100%
     resolves against the whole column and blew the card up to ~460px tall with
     its content floating in the middle. */
  height: auto;
}
.stat-row .stat-icon { margin-bottom: 0; }
.stat-row .stat-body { margin-right: auto; }

/* ---- Listing status badges ----
   Soft tints in the same language as the .badge-* set above. "Sold" is
   deliberately neutral, not red: it is the outcome the dealer wants, and
   red read as an error state in the listings table. */
.badge-draft, .badge-published, .badge-sold,
.badge-paused, .badge-expired, .badge-boosted {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35em 0.7em;
  font-size: 0.75em;
  font-weight: 600;
  border-radius: 50rem;
  white-space: nowrap;
}
.badge-published { background-color: #e6f5ef; color: #0b6b49; }
.badge-sold      { background-color: #eef0f3; color: #495057; }
.badge-draft     { background-color: #f4f5f9; color: #6c757d; }
.badge-paused    { background-color: #fdf3dd; color: #cc8f00; }
.badge-expired   { background-color: #fde8ea; color: #c53249; }
.badge-boosted   { background-color: #fdf3dd; color: #cc8f00; }

/* ---- Empty states ----
   One component for every "nothing here yet" panel in the dashboard. */
.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  background-color: #fff;
  border-radius: 12px;
}
.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  background: #e6f5ef;
  color: #0f8b5f;
  font-size: 1.6rem;
}
.empty-state h5 {
  font-weight: 600;
  color: #1c1f23;
}
.empty-state p {
  max-width: 34rem;
  margin-inline: auto;
  color: #6c757d;
}
/* Legacy markup passes a bare <i> straight into .empty-state; keep those
   looking like the chip above without touching every template. */
.empty-state > i:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  background: #e6f5ef;
  color: #0f8b5f;
  font-size: 1.6rem;
}

/* ---- Dashboard tables ---- */
.dash-table-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
}
.dash-table-card .table { margin-bottom: 0; }
.dash-table-card .table th {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6c757d;
}
.dash-table-card .table td {
  vertical-align: middle;
  border-color: #f1f3f5;
}
.dash-table-card .table tr:hover td {
  background-color: rgba(15, 139, 95, 0.03);
}

/* Compact action cluster in listing rows */
.action-btn {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

/* Bootstrap's outline-secondary is close enough to a disabled control that a
   working Edit button read as switched off next to the locked delete. Enabled
   neutral actions get darker ink and a live hover; disabled ones get a dashed
   border and a not-allowed cursor, so the two can never be confused again. */
.action-btn.btn-outline-secondary {
  color: #445;
  border-color: #b9c0c7;
}

.action-btn:not(:disabled):not(.disabled):hover,
.action-btn:not(:disabled):not(.disabled):focus-visible {
  color: #0f6b43;
  border-color: #198754;
  background-color: #f1f8f4;
}

.action-btn.btn-outline-danger:not(:disabled):hover,
.action-btn.btn-outline-danger:not(:disabled):focus-visible {
  color: #b02a37;
  border-color: #b02a37;
  background-color: #fbeceb;
}

.action-btn:disabled,
.action-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-style: dashed;
  box-shadow: none;
}

/* ---- Phones ----
   The dashboard is mostly read on a phone, so tiles get tighter, the page
   head stacks, and every primary action becomes a full-width tap target
   rather than a small button pinned to the right edge. */
@media (max-width: 575.98px) {
  .dash-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    margin-bottom: 1rem;
  }
  .dash-head .btn {
    width: 100%;
  }
  .dash-title { font-size: 1.2rem; }

  .stat-card { padding: 0.85rem 0.9rem; }
  .stat-icon {
    width: 30px;
    height: 30px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }
  .stat-value { font-size: 1.35rem; }
  .stat-label { font-size: 0.75rem; }

  /* Wallet strip: balance on top, full-width top-up underneath */
  .stat-card.is-feature .btn { width: 100%; }

  .empty-state { padding: 2.25rem 1rem; }
  .empty-state-icon,
  .empty-state > i:first-child {
    width: 54px;
    height: 54px;
    font-size: 1.35rem;
    margin-bottom: 1rem;
  }

  /* Tables inside .table-responsive can scroll sideways, but the row
     content should not be so cramped that it wraps to three lines. */
  .dash-table-card .table th,
  .dash-table-card .table td {
    padding: 0.7rem 0.6rem;
  }
}

/* The dashboard column sits behind the fixed mobile bottom nav below lg;
   side_filter.html already reserves 60px, but a full-width CTA at the end
   of a page needs a little more breathing room than that. */
@media (max-width: 991.98px) {
  main.dashboard-area { padding-bottom: 76px; }
}

/* ---- Shared chat/messaging widget styles: used by both the dashboard
   message thread page and the inline "Message Seller" widget on the
   product detail page, so both look like the same chat product. ---- */
.chat-bubble {
  max-width: 75%;
  padding: 0.6rem 1rem;
  border-radius: 1rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.chat-bubble.mine {
  background-color: #198754;
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 0.25rem;
}
.chat-bubble.theirs {
  background-color: #f1f3f5;
  color: #212529;
  margin-right: auto;
  border-bottom-left-radius: 0.25rem;
}
.chat-bubble small {
  display: block;
  opacity: 0.7;
  font-size: 0.7rem;
  margin-top: 0.25rem;
}
.chat-log {
  background-color: #f8f9fa;
}
.chat-empty-state {
  color: #6c757d;
  text-align: center;
  padding: 1.5rem 1rem;
}
.chat-composer textarea {
  resize: none;
  border-radius: 1rem;
  border: 1px solid #dee2e6;
  padding: 0.75rem 1rem;
}
.chat-composer textarea:focus {
  box-shadow: none;
  border-color: #198754;
}
.chat-composer .btn-send {
  border-radius: 2rem;
  padding-inline: 1.5rem;
}


/* Promotion plan cards + the car picker thumbnails */
.promo-plan {
  position: relative;
  overflow: visible;
}

.promo-plan-featured {
  outline: 2px solid #0f8b5f;
  outline-offset: 0;
}

.promo-plan-badge {
  position: absolute;
  top: -0.7rem;
  right: 0.75rem;
  z-index: 2;
  background: #0f8b5f;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.promo-plan-tagline {
  font-size: 0.86rem;
  line-height: 1.45;
  color: #5c6b60;
  margin-bottom: 1rem;
}

.promo-thumb {
  display: block;
  cursor: pointer;
}

.promo-thumb img,
.promo-thumb-img,
.promo-thumb-empty {
  width: 72px;
  height: 54px;
  border-radius: 0.375rem;
  object-fit: cover;
  background: #eef1ee;
}

.promo-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9aa79e;
}

/* Dashboard breadcrumbs */
.dash-breadcrumb {
  margin-bottom: 0.85rem;
}

.dash-breadcrumb .breadcrumb {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.5rem 0.85rem;
  background: #f1f5f2;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  white-space: nowrap;
}

.dash-breadcrumb .breadcrumb::-webkit-scrollbar {
  display: none;
}

.dash-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: "\203A";
  color: #9aa79e;
  padding-inline: 0.5rem;
}

.dash-breadcrumb .breadcrumb-item a {
  color: #198754;
  text-decoration: none;
}

.dash-breadcrumb .breadcrumb-item a:hover,
.dash-breadcrumb .breadcrumb-item a:focus-visible {
  text-decoration: underline;
}

.dash-breadcrumb .breadcrumb-item.active {
  color: #495057;
  font-weight: 600;
}

@media (max-width: 991.98px) {
  .dash-breadcrumb {
    margin-bottom: 0.6rem;
  }
}

/* Promotion confirmation summary tiles */
.confirm-stat {
  border: 1px solid #e3e8e4;
  border-radius: 0.5rem;
  padding: 0.65rem 0.85rem;
  height: 100%;
  background: #fff;
}

.confirm-stat-total {
  border-color: #198754;
  background: #f1f8f4;
}

.confirm-stat-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
}

.confirm-stat-value {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #212529;
}

.confirm-stat-total .confirm-stat-value {
  color: #0f6b43;
}

/* Listing identity: name over meta. Shared by the dealer listing table, the
   promo car picker and the promo confirmation page so a car looks the same
   everywhere a dealer is asked to recognise it. */
.listing-identity {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.listing-identity-name {
  color: #212529;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 26ch;
}

.listing-identity-name:hover,
.listing-identity-name:focus-visible {
  color: #198754;
  text-decoration: underline;
}

.listing-identity-meta {
  color: #6c757d;
  font-size: 0.8rem;
  line-height: 1.3;
}

/* Date fields: the browser's own "dd/mm/yyyy" is noise until a date is picked.
   Empty and unfocused, we show a calendar icon and a plain-language hint; the
   real date edit appears on focus or once a value exists. The native picker
   indicator is stretched invisibly over the whole control so clicking anywhere
   in the field opens the calendar -- no JS needed for that part. */
.date-field {
  position: relative;
}

.date-field .form-control {
  padding-right: 2.4rem;
}

.date-field input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.date-field-icon {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 0.9rem;
  pointer-events: none;
}

.date-field-placeholder {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  transform: translateY(-50%);
  color: #8a9490;
  font-size: 0.95rem;
  pointer-events: none;
  display: none;
}

.date-field.is-empty .date-field-placeholder {
  display: block;
}

/* Blank out the dd/mm/yyyy spinner text while the hint is showing. */
.date-field.is-empty input[type="date"]::-webkit-datetime-edit {
  color: transparent;
}

.date-field.is-empty input[type="date"]:focus::-webkit-datetime-edit {
  color: inherit;
}

.date-field.is-empty input[type="date"]:focus + .date-field-placeholder {
  display: none;
}

.date-field input[type="date"]:focus ~ .date-field-icon {
  color: #198754;
}

/* Firefox shows its own empty-value text; keep it muted rather than hidden so
   the control never looks broken there. */
@supports (-moz-appearance: none) {
  .date-field.is-empty input[type="date"] {
    color: #8a9490;
  }
  .date-field.is-empty .date-field-placeholder {
    display: none;
  }
}

/* Plan radios on the create/edit listing forms: name + price on one line,
   the reason to care underneath. Whole row is a click target. */
.plan-choice {
  padding: 0.5rem 0.65rem 0.5rem 2rem;
  border: 1px solid #e3e8e4;
  border-radius: 0.5rem;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.plan-choice:hover {
  border-color: #b9d6c6;
  background: #f7fbf8;
}

.plan-choice .form-check-input:checked ~ .form-check-label {
  color: #0f6b43;
}

.plan-choice:has(.form-check-input:checked) {
  border-color: #198754;
  background: #f1f8f4;
}

.plan-choice .form-check-label {
  width: 100%;
  cursor: pointer;
}

.plan-choice-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.plan-choice-name {
  font-weight: 600;
  font-size: 0.92rem;
}

.plan-choice-price {
  font-weight: 700;
  white-space: nowrap;
}

.plan-choice-meta {
  display: block;
  color: #6c757d;
  font-size: 0.78rem;
  line-height: 1.35;
}

.plan-choice-badge {
  display: inline-block;
  margin-left: 0.35rem;
  background: #198754;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  vertical-align: middle;
}

.plan-choice-none {
  border-style: dashed;
}

/* Sponsored badge: the buyer-facing disclosure that a dealer paid for this
   placement. Required by templates/pages/affiliate_ads_disclosure.html, so it
   must render wherever a boosted card does -- amber, never green, so it reads
   as a label rather than as a Carspace endorsement of the car. */
.badge-sponsored {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  margin: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3em 0.65em;
  background: #fdf3dd;
  color: #8a6100;
  border: 1px solid #f0d89a;
  border-radius: 50rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.badge-sponsored i {
  font-size: 0.65rem;
}

.badge-sponsored-lg {
  margin: 0.85rem;
  padding: 0.4em 0.85em;
  font-size: 0.78rem;
}

/* Listing card thumbnail frame. A portrait photo and a landscape photo in
   the same fixed-height box can't both fill it edge to edge without cropping
   one of them -- so the box itself is filled with a blurred, zoomed copy of
   the same photo (the ::before layer) and the sharp photo sits on top,
   letterboxed via object-fit: contain. Every card ends up the same height
   with no cropped car and no plain dead space on the sides. */
.product-image-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  background-size: cover;
  background-position: center;
}

.product-image-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.85);
  transform: scale(1.15);
}

.product-image-frame img.product-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* A delete that is not allowed yet: reads as unavailable but stays clickable,
   because the click is what explains the rule. */
.action-btn.is-blocked {
  opacity: 0.55;
  border-style: dashed;
}

.action-btn.is-blocked:hover,
.action-btn.is-blocked:focus-visible {
  opacity: 1;
}

/* ---------------------------------------------------------------------------
   Listing cards: the "2 hours ago" line.

   It sits on its own row beneath the condition badge and locality rather than
   joining them. That row is already a two-child flex on a card that can be a
   quarter of the viewport at the md breakpoint, and a third child there is
   what pushes a long locality like "Central Business District, Abuja" into
   wrapping -- which makes one card in a grid row taller than the rest.

   Clipped rather than wrapped for the same reason. The string is short by
   construction (published_ago emits one unit), so the ellipsis should never
   actually appear; it is a floor under the worst case, not a layout we expect
   to hit.
--------------------------------------------------------------------------- */
.listing-posted {
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Below Bootstrap's sm breakpoint the cards go full width but the type wants
   to stay subordinate to the price and title, which do not shrink. */
@media (max-width: 575.98px) {
  .listing-posted {
    font-size: 0.72rem;
  }
}

/* ---------------------------------------------------------------------------
   Blog post body: even reading typography.

   post.body is hand-written (or published_article) HTML with no classes of
   its own -- <p>, <h2>, <table>, <ul> straight from the article source -- so
   without rules scoped under .post-body it falls back to bare browser
   defaults: cramped line-height, inconsistent heading spacing, unstyled
   tables. Everything here is scoped under .post-body so none of it leaks
   onto any other page that happens to render a <table> or a <blockquote>.
--------------------------------------------------------------------------- */
.post-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #2c2c2c;
}

.post-body p {
  margin: 0 0 1.35em;
}

.post-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2.1em 0 0.9em;
}

.post-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.8em 0 0.7em;
}

.post-body h2:first-child,
.post-body h3:first-child {
  margin-top: 0;
}

.post-body ul,
.post-body ol {
  margin: 0 0 1.35em;
  padding-left: 1.4em;
}

.post-body li {
  margin-bottom: 0.5em;
  line-height: 1.75;
}

.post-body a {
  color: #0b6b49;
  text-decoration: underline;
  text-decoration-color: rgba(11, 107, 73, 0.35);
}

.post-body a:hover {
  text-decoration-color: #0b6b49;
}

.post-body strong {
  font-weight: 700;
}

.post-body table {
  width: 100%;
  margin: 0 0 1.6em;
  font-size: 0.95rem;
}

.post-body th,
.post-body td {
  padding: 10px 14px;
}

.post-body blockquote {
  border-left: 3px solid #0b6b49;
  padding: 0.4em 1.2em;
  margin: 1.6em 0;
  color: #52514e;
  font-style: italic;
}

@media (max-width: 575.98px) {
  .post-body {
    font-size: 1rem;
  }
}

/* ---------------------------------------------------------------------------
   Share bar: sticks to the top of the viewport once the reader scrolls past
   it, the way wheelzar.com and 234drive.com keep sharing one scroll away
   instead of buried back at the top of a long article. There is no fixed
   navbar on this site, so top: 0 is the correct stick point -- nothing sits
   above it to account for.
--------------------------------------------------------------------------- */
.share-bar {
  position: sticky;
  top: 0;
  z-index: 15;
  background: var(--bs-body-bg, #fff);
  border-bottom: 1px solid #eef0f3;
  padding: 10px 0;
  margin-bottom: 1.5rem;
}

.share-bar__label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a8883;
  margin-right: 8px;
}

.share-bar__links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-bar__link {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f5f9;
  color: #495057;
  border: none;
  transition: background 0.15s, color 0.15s;
}

.share-bar__link:hover {
  background: #0b6b49;
  color: #fff;
}

/* ---------------------------------------------------------------------------
   Blog sidebar: sticks alongside the article instead of scrolling away after
   the first screen, matching wheelzar.com's cs-sticky-sidebar behaviour.
   align-self: flex-start is required alongside position: sticky here --
   Bootstrap's .row is a flex container with the default align-items:
   stretch, which would otherwise force this column to the article's full
   height and leave sticky with nothing to stick within.

   Large screens only. On mobile the sidebar already sits below the article
   in document order, where sticking it would just pin an empty column under
   the reader's thumb while they are still reading.
--------------------------------------------------------------------------- */
@media (min-width: 992px) {
  .blog-sidebar-sticky {
    position: sticky;
    top: 20px;
    align-self: flex-start;
  }
}

.recent-posts__thumb {
  width: 64px;
  height: 56px;
  object-fit: cover;
}

.recent-posts__title {
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
