/* === ADOS WAVE 2 DESKTOP CSS === */
/* ==========================================================================
 * BUDD BAER SUBARU (www.buddbaersubaru.com | siteId: buddbaersubarusoa)
 * Dealer.com Composer Wave 2 Self-Service Desktop Custom Stylesheet
 * OEM Compliance: Subaru Love Promise Digital Standards (Subaru Rally Sapphire #0056b3)
 * Coverage: BU2-POPUP-00, BU2-TASK-01, BU2-TASK-02, BU2-TASK-03, BU2-TASK-04,
 *           BU2-TASK-05, BU2-TASK-06, BU2-TASK-08, BU2-TASK-09, BU2-TASK-10,
 *           BU2-TASK-11, BU2-TASK-12
 * ========================================================================== */

:root {
  --ados-brand-primary: #0056b3;
  --ados-brand-primary-hover: #003d82;
  --ados-brand-soft: #eff6ff;
  --ados-ink: #0f172a;
  --ados-ink-secondary: #334155;
  --ados-muted: #475569;
  --ados-surface: #ffffff;
  --ados-surface-alt: #f8fafc;
  --ados-line: #cbd5e1;
  --ados-success: #047857;
  --ados-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 1. BU2-POPUP-00 & BU2-TASK-05: Unsolicited Popup Purge & Widget Clearance */
iframe.als-agent:not([data-ados-user-opened="true"]),
div.als-chat-side:not([data-ados-user-opened="true"]),
.CarcodeWidgetGlobalCallOutContainer,
.CallOut-eve,
.WidgetToolbarContaineruLS,
.purecars-offer-modal:not([data-ados-user-opened="true"]),
#purecars-modal:not([data-ados-user-opened="true"]),
.edmunds-PopupWrapper:not([data-ados-user-opened="true"]),
div[class*="carcode" i][class*="callout" i] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.CarcodeWidgetContainer,
button.als-agent-coin,
aside#ae_launcher {
  bottom: 64px !important;
  right: 16px !important;
  z-index: 9980 !important;
}

/* 2. BU2-TASK-01: Single-Row Navigation & Zero Wrapping / Duplication Cleanup */
@media (min-width: 1024px) {
  .navigation-default ul.navbar-nav,
  header nav > ul,
  #header .navbar-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    white-space: nowrap !important;
  }

  .navigation-default > ul.navbar-nav > li > a[href="/"],
  .navigation-default > ul.navbar-nav > li:empty,
  li[data-ados-nav-dup="true"] {
    display: none !important;
  }

  .navigation-default ul.navbar-nav > li > a {
    padding: 10px 12px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
  }
}

/* 3. BU2-TASK-02: Primary CTA Chromatic Isolation in Subaru Rally Sapphire (#0056b3) */
a.btn[href*="/new-inventory/index.htm"],
a.btn[href*="/service/schedule"],
a.btn[href*="/service.htm"],
a.btn[href*="/kbb.htm"],
a.btn[href*="/trade-up-advantage.htm"],
a[aria-label*="Explore New" i],
a[aria-label*="View New" i],
button.btn-primary,
.dialog.pointer[data-href*="eprice"],
.ados-btn-primary {
  background-color: var(--ados-brand-primary) !important;
  border: 2px solid var(--ados-brand-primary) !important;
  border-color: var(--ados-brand-primary) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 8px rgba(0, 86, 179, 0.25) !important;
  transition: background-color 0.15s ease, transform 0.15s ease !important;
}

a.btn[href*="/new-inventory/index.htm"]:hover,
.ados-btn-primary:hover {
  background-color: var(--ados-brand-primary-hover) !important;
  border-color: var(--ados-brand-primary-hover) !important;
  color: #ffffff !important;
}

/* Secondary Actions Demoted to High-Contrast Ghost Outlined Pills (60-30-10 Rule) */
a.btn.btn-default:not([href*="/new-inventory/index.htm"]):not(.ados-btn-primary),
a.btn.btn-secondary,
.ados-btn-ghost {
  background-color: #ffffff !important;
  border: 1.5px solid var(--ados-brand-primary) !important;
  border-color: var(--ados-brand-primary) !important;
  color: var(--ados-brand-primary) !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

a.btn.btn-default:not([href*="/new-inventory/index.htm"]):not(.ados-btn-primary):hover,
.ados-btn-ghost:hover {
  background-color: var(--ados-brand-soft) !important;
  color: var(--ados-brand-primary-hover) !important;
}

/* 4. BU2-TASK-03: Vehicle Thumbnail Aspect Containment & Crisp Rendering */
img[src*="images.dealer.com/ddc/vehicles/"],
img[src*="pictures.dealer.com/"],
img[src*="content.homenetiol.com"],
.vehicle-card img,
.model-lineup img,
.jcarousel img {
  object-fit: contain !important;
  aspect-ratio: 16 / 10;
  max-width: 100% !important;
  height: auto !important;
}

/* 5. BU2-TASK-06: Typography Discipline, <=68ch Measure & Title-Case Normalization */
body,
.ddc-content,
.page-section {
  font-family: var(--ados-font-sans) !important;
  color: var(--ados-ink);
}

.page-section p,
.ddc-content p,
.content-default p {
  max-width: 68ch !important;
  line-height: 1.65 !important;
  font-size: 16px !important;
  text-transform: none !important;
}

p[data-ados-normalized-caps="true"],
.ddc-content p[style*="uppercase"] {
  text-transform: none !important;
}

/* 6. BU2-TASK-10: Above-the-Fold 4-Pill "Why Buy From Budd Baer Subaru" Value Stack */
.ados-why-buy-strip {
  background: linear-gradient(90deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 12px 20px;
  border-bottom: 2px solid var(--ados-brand-primary);
  width: 100%;
  box-sizing: border-box;
}

.ados-why-buy-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

.ados-why-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #ffffff;
}

.ados-why-pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ados-brand-primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

/* 7. BU2-TASK-04, BU2-TASK-08 & BU2-TASK-12: PA 6% / WV 6% / OH 5.75% Trade Tax & Payment Studio */
.ados-tax-studio {
  max-width: 1360px;
  margin: 20px auto;
  background: #ffffff;
  border: 2px solid var(--ados-line);
  border-color: var(--ados-line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
}

.ados-tax-studio-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ados-line);
}

.ados-state-switch {
  display: inline-flex;
  background: var(--ados-surface-alt);
  border: 1px solid var(--ados-line);
  border-color: var(--ados-line);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
}

.ados-state-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ados-ink-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  min-height: 44px;
}

.ados-state-btn[aria-pressed="true"] {
  background: var(--ados-brand-primary);
  color: #ffffff;
  border-color: var(--ados-brand-primary);
  box-shadow: 0 1px 4px rgba(0, 86, 179, 0.3);
}

.ados-tax-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.ados-tax-results-card {
  background: var(--ados-brand-soft);
  border: 1.5px solid var(--ados-brand-primary);
  border-color: var(--ados-brand-primary);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 8. BU2-TASK-09: Above-the-Fold Service & Recall Self-Service Hub (/service.htm & /service/center.htm) */
.ados-service-hub {
  max-width: 1360px;
  margin: 18px auto;
  padding: 20px;
  background: #ffffff;
  border: 2px solid var(--ados-line);
  border-color: var(--ados-line);
  border-radius: 12px;
  box-sizing: border-box;
}

.ados-service-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ados-service-card {
  border: 1px solid var(--ados-line);
  border-color: var(--ados-line);
  border-radius: 10px;
  padding: 18px;
  background: var(--ados-surface-alt);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

/* 9. BU2-TASK-11: WCAG 2.2 AA 44x44px Hit Targets & Focus Ring Hygiene */
header a,
header button,
.header-minimal-container a,
.header-minimal-container button,
.ados-touch-target {
  min-width: 44px !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--ados-brand-primary) !important;
  outline-offset: 2px !important;
}

/* === Universal Viewport Boundary Containment & Zero Horizontal Overflow (Mobile 390px / Tablet 768px / Desktop 1440px) === */
html, body, .ddc-wrapper, .page-bd, header, .header-default, .navigation-default {
  max-width: 100vw !important;
  overflow-x: clip !important;
}
@supports not (overflow-x: clip) {
  html, body, .ddc-wrapper, .page-bd, header, .header-default, .navigation-default {
    overflow-x: hidden !important;
  }
}
@media (max-width: 1023px) {
  .header-default .d-flex,
  .header-mycars-search-container,
  .ws-mycars-nav-wrapper {
    min-width: 0 !important;
    max-width: 100% !important;
    flex-shrink: 1 !important;
  }
}


/* === EXCLUSIVE CHAT/TEXT INTERFACE: FULLPATH ONLY (Purge CarCode/Edmunds, VelocityEngage, PureCars, etc.) === */
/* 1. Completely purge competing non-Fullpath chat/SMS/offer widgets */
.CarcodeWidgetContainer,
div[class*="CarcodeWidget"],
.CarcodeWidgetGlobalCallOutContainer,
.CallOut-eve,
.WidgetToolbarContaineruLS,
.js-carcode-eve-toolbar,
.WidgetEveToolbarFag,
#carcode-widget,
iframe[src*="carcodesms.com"],
iframe[src*="edmunds.com"],
.purecars-offer-modal,
#purecars-modal,
div[id^="purecars"],
iframe[src*="purecars.com"],
.velocity-engage-button,
#velocity-engage-container,
iframe[src*="velocityengage.com"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
}

/* 2. Fullpath (AutoLeadStar) Exclusive Interface Rules:
   - Never auto-pop the 360x284px iframe.als-agent on page load unless user explicitly clicks Fullpath launcher or Chat button (html[data-fullpath-open="true"] or body[data-bb-user-chat-active="true"]).
   - Hide the redundant left-edge vertical 'CHAT' tab (div.als-chat-side) so there is only ONE clean Fullpath launcher.
   - Position the single Fullpath launcher coin (button.als-agent-coin) cleanly at bottom-right above the mobile communication bar (bottom: 64px !important; right: 12px !important; left: auto !important). */
div.als-chat-side,
div.als-chat.als-chat-side.als-chat-left {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html:not([data-fullpath-open="true"]) body:not([data-bb-user-chat-active="true"]) iframe.als-agent:not([data-user-opened="true"]) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html[data-fullpath-open="true"] iframe.als-agent,
body[data-bb-user-chat-active="true"] iframe.als-agent,
iframe.als-agent[data-user-opened="true"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 99999999 !important;
}

button.als-agent-coin {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: fixed !important;
  right: 12px !important;
  left: auto !important;
  bottom: 64px !important;
  width: 52px !important;
  height: 52px !important;
  z-index: 999990 !important;
}


.slick-list,
.slick-slider,
.wsm-specials-display,
.fixed-program-aspect-ratio-blurred-box,
.page-section,
.ddc-content {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}