/* ===========================================================================
   S8 REDESIGN — 99 OVERRIDES
   Last-resort fixes that must beat earlier !important / high-specificity rules:
   - enforce proportional radii on buttons/cards/fields vs legacy 999px!important
   - kill cool-slate (#0f172a / 15,23,42) leftovers not covered by tokens
   Doubled class selectors raise specificity to win the cascade at equal !important.
   =========================================================================== */

/* compact button corners over legacy border-radius:999px!important */
.dag-btn.dag-btn, .dag-btn--full.dag-btn--full,
.cyp-btn.cyp-btn, .cyp-btn--primary.cyp-btn--primary, .cyp-btn--sm.cyp-btn--sm,
.hw-btn.hw-btn, .btn.btn, .dag-about__btn.dag-about__btn {
  border-radius: var(--s8-radius-sm) !important;
}

/* medium card corners over any legacy big radius */
.cyp-inv__card.cyp-inv__card, .hw-card.hw-card, .inventory-card.inventory-card,
.cyp-card.cyp-card, .dag-specs-card.dag-specs-card {
  border-radius: var(--s8-radius-md) !important;
}

/* compact fields */
.dag-form-field input.dag-form-field input { border-radius: var(--s8-radius-sm) !important; }

/* slate -> graphite for pagination + any slate-tinted surface that reads cold */
.page-numbers, a.page-numbers, span.page-numbers,
.pagi, .pagination, .nav-links {
  background-color: var(--s8-surface);
  color: var(--s8-text);
  border-color: var(--s8-border);
  border-radius: var(--s8-radius-sm) !important;
}
.page-numbers.current, a.page-numbers:hover {
  background-color: var(--s8-accent) !important;
  color: var(--s8-accent-contrast) !important;
  border-color: var(--s8-accent) !important;
}

/* === V3.2: COMPACT FORM FIELDS — beats legacy `#page …{border-radius:…}!important`
   from inline Customizer CSS via higher specificity (html body #page + :not attrs). === */
html body #page input:not([type=checkbox]):not([type=radio]),
html body #page select,
html body #page textarea,
html body #page button,
html body #page .dag-phone-prefix,
html body #page .dag-phone-wrap input,
html body .home-contact__field input,
html body .home-contact__field select,
html body .home-contact__field textarea,
html body .home-contact .dag-phone-wrap,
html body .hw-form input,
html body .hw-form select,
html body .hw-form textarea,
html body .hw-inputGroup input,
html body form.dag-form input:not([type=checkbox]):not([type=radio]),
html body form.dag-form select,
html body form.dag-form textarea,
html body form.contact-page-form input,
html body form.contact-page-form select,
html body form.contact-page-form textarea,
html body .cyp-inv__form input,
html body .cyp-inv__form select {
  border-radius: var(--s8-radius-sm) !important;
}

/* === V3.4: BUTTON CONTRAST SYSTEM — no button may blend into a dark background.
   Two classes only: GOLD SOLID (primary actions) and VISIBLE GHOST (secondary).
   html body prefix beats every legacy layer incl. 70-legacy. === */
/* LITERALS on purpose: this block must survive even if custom properties break. */
html body .s8-cta-btn--gold, html body .s8-cta-btn--inv, html body .s8-fpanel__cta,
html body .hw-btn--primary, html body .hw-btn--accent, html body .hw-card__cta,
html body .cyp-btn--primary, html body .dag-btn--primary, html body .dag-about__btn--primary,
html body .btn-primary, html body .ty-btn--primary {
  background: #d4af37 !important;
  color: #0b0d10 !important;
  border: 1px solid #d4af37 !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
html body .s8-cta-btn--gold:hover, html body .s8-cta-btn--inv:hover, html body .s8-fpanel__cta:hover,
html body .hw-btn--primary:hover, html body .hw-btn--accent:hover, html body .hw-card__cta:hover,
html body .cyp-btn--primary:hover, html body .dag-btn--primary:hover, html body .dag-about__btn--primary:hover,
html body .btn-primary:hover, html body .ty-btn--primary:hover {
  background: #e2c55c !important;
  border-color: #e2c55c !important;
  color: #0b0d10 !important;
}
html body .s8-cta-btn--ghost, html body .hw-btn--ghost, html body .cyp-btn--ghost,
html body .dag-btn--ghost, html body .dag-about__btn--ghost, html body .btn-outline,
html body .ty-btn--ghost {
  background: rgba(255, 255, 255, .05) !important;
  color: #f4f1e8 !important;
  border: 1px solid rgba(212, 175, 55, .65) !important;
  box-shadow: none !important;
}
html body .s8-cta-btn--ghost:hover, html body .hw-btn--ghost:hover, html body .cyp-btn--ghost:hover,
html body .dag-btn--ghost:hover, html body .dag-about__btn--ghost:hover, html body .btn-outline:hover,
html body .ty-btn--ghost:hover {
  background: rgba(212, 175, 55, .14) !important;
  border-color: #d4af37 !important;
  color: #d4af37 !important;
}
/* hero trust pills: readable, not buttons — quiet outline */
html body .s8-hero .hw-pill { color: #f4f1e8 !important; border: 1px solid rgba(244, 241, 232, .26) !important; background: rgba(0, 0, 0, .5) !important; }

/* topbar/header CTA gold — literal, beats 03's var()-based (0,2,0) rules */
html body .s8-topbar-v3 .s8-cta-btn--gold,
html body .s8-header-v3 .s8-cta-btn--gold,
html body .s8-hcmd-v3 .s8-cta-btn--gold {
  background: #d4af37 !important;
  color: #0b0d10 !important;
  border: 1px solid #d4af37 !important;
}
html body .s8-topbar-v3 .s8-cta-btn--gold:hover { background: #e2c55c !important; border-color: #e2c55c !important; }

/* === V3.5: PROPORTIONAL CORNER SYSTEM =====================================
   Small controls, medium cards, large feature/form panels. Full-width bands
   and navigation stay square so the page keeps its structured character. */
html body .dag-phone-wrap {
  border-radius: var(--s8-radius-sm) !important;
  overflow: hidden;
}
html body .dag-phone-wrap .dag-phone-prefix {
  border-radius: var(--s8-radius-sm) 0 0 var(--s8-radius-sm) !important;
}
html body .dag-phone-wrap input:not([type=checkbox]):not([type=radio]) {
  border-radius: 0 var(--s8-radius-sm) var(--s8-radius-sm) 0 !important;
}

html body .s8-panel,
html body .s8-cta,
html body .hw-info,
html body .hw-hours,
html body .cyp-card,
html body .cyp-inv__card,
html body .hw-card,
html body .inventory-card,
html body .dag-specs-card,
html body .dag-pricebox,
html body .dag-lead,
html body .dag-section,
html body .cyp-inv__sidebar-card,
html body .cyp-inv__sidebar-note,
html body .dag-about__card,
html body .dag-about__teamCard,
html body .dag-about__stat,
html body .c-contact-card,
html body .c-contact-panel,
html body .fin-card,
html body .fin-step,
html body .fin-faq__item,
html body .dag-ship__card,
html body .dag-ship__step,
html body .dag-ship__aside-card,
html body .legal-note,
html body .legal-toc__link,
html body .dag-prose,
html body .iz-sc__card,
html body .dag-specs > div {
  border-radius: var(--s8-radius-md) !important;
}

html body .hw-hero__panel,
html body .hw-news__card,
html body .hw-contact__formCard,
html body .c-contact__formCard,
html body .fin-hero__media,
html body .dag-ship__form,
html body .ty-card,
html body .ty__card,
html body .dag-gallery,
html body .dag-car__desc {
  border-radius: var(--s8-radius-lg) !important;
  overflow: hidden;
}

html body .dag-gallery__stage {
  border-radius: var(--s8-radius-lg) var(--s8-radius-lg) 0 0 !important;
  overflow: hidden;
}

html body .dag-gallery__figure {
  border-radius: inherit !important;
}

html body .dag-thumb,
html body .dag-thumb img {
  border-radius: var(--s8-radius-xs) !important;
}

html body .hw-contact__formCard .hw-form,
html body .hw-news__card .hw-form {
  border-radius: var(--s8-radius-md) !important;
}

html body .cyp-inv__media,
html body .hw-card__media,
html body .inventory-card__media {
  border-radius: var(--s8-radius-md) var(--s8-radius-md) 0 0 !important;
}

html body .iz-uf__button,
html body .dag-gallery__open,
html body .dag-nav,
html body .dag-lightbox__nav,
html body .dag-lightbox__close {
  border-radius: var(--s8-radius-sm) !important;
}

/* Header controls follow the same geometry as controls throughout the site.
   The header's earlier blanket square reset is intentionally overridden. */
html body .s8-topbar-v3 .s8-cta-btn,
html body .s8-header-v3 .s8-cta-btn,
html body .s8-header-v3 .wpdevart-header-action-button,
html body .s8-header-v3 .wpdevart_car_rental_wda_hover_button_small,
html body .s8-header-v3 .search-menu-buttons,
html body .s8-header-v3 .site-header__search-trigger,
html body .s8-header-v3 .navbar-toggler,
html body .s8-header-v3 .wpdevartmobilemenu {
  border-radius: var(--s8-radius-sm) !important;
}

html body .s8-header-v3 .s8-header-brand-v3 > h1 > a,
html body .s8-header-v3 .s8-header-brand-v3 > h2 > a,
html body .s8-header-v3 .s8-header-brand-v3 img,
html body .s8-header-v3 .s8-header-brand-v3 .custom-logo {
  border-radius: var(--s8-radius-md) !important;
  overflow: hidden;
}

html body .s8-header-v3 nav ul ul,
html body .s8-mobile-nav-v3,
html body .s8-header-v3 .navbar-wpdevart {
  border-radius: var(--s8-radius-md) !important;
  overflow: hidden;
}

/* Remaining page surfaces: same control/card/panel scale on every template. */
html body .hw-chip,
html body .hw-pill,
html body .hw-meta,
html body .cyp-badge,
html body .cyp-inv__year,
html body .dag-chip,
html body .dag-breadcrumbs a,
html body .dag-ship__kicker,
html body .legal-pill,
html body .p-about__pill,
html body .inventory-tag,
html body .dag-sold-badge {
  border-radius: var(--s8-radius-xs) !important;
}

html body .home-featured__card,
html body .home-brands__item,
html body .dag-card,
html body .dag-contact__card,
html body .contact-banner__content,
html body .contact-banner__image,
html body .contact-map__frame,
html body .dag-contact-card,
html body .dag-hours,
html body .dag-notice,
html body .shipping-step,
html body .team-card,
html body .testimonial-card,
html body .thankyou-card,
html body .contact-info__item,
html body .contact-notice,
html body .dag-inv-card,
html body .vehicle-card,
html body .vehicle-details,
html body .vehicle-description__content,
html body .faq-item,
html body .legal-card,
html body .legal-toc,
html body .legal-article,
html body .car-hero__right,
html body .car-gallery,
html body .car-tabs__content,
html body .car-contact__left,
html body .car-card {
  border-radius: var(--s8-radius-md) !important;
}

html body .p-about__heroFrame,
html body .p-about__media,
html body .p-about__card,
html body .p-about__stat,
html body .p-about__teamCard,
html body .p-about__faqItem,
html body .p-about__cta,
html body .about-page .about-hero__media-frame,
html body .dag-aside-photo,
html body .dag-contact-formWrap,
html body .dag-contact-form,
html body .dag-map,
html body .dag-ship__trust-item,
html body .legal-shell {
  border-radius: var(--s8-radius-lg) !important;
  overflow: hidden;
}

html body .shipping-step__num,
html body .dag-ship__trust-ic,
html body .dag-ship__step-num,
html body .ty-badge,
html body .ty__badge,
html body .ty__badge-dot,
html body .s8-topbar-v3__dot {
  border-radius: 50% !important;
}

/* === V3.8: FULL TEMPLATE CORNER AUDIT ====================================
   These selectors are the remaining legacy page-specific surfaces observed
   in the browser after the shared geometry pass. Semantic dots remain round;
   chips, links, controls, cards, maps, notices, and forms use the same scale. */
html body .dag-breadcrumb__link,
html body .dag-gallery__counter,
html body .dag-about__jumpLink,
html body .dag-about__pill,
html body .c-contact-hero__kicker,
html body .dag-ship__subnav-cta,
html body .dag-ship__subnav a {
  border-radius: var(--s8-radius-xs) !important;
}

html body .dag-about__heroFrame,
html body .dag-about__media,
html body .dag-about__quote,
html body .dag-about__person,
html body .dag-about__callout,
html body .dag-about__faqItem,
html body .dag-about__contactCard,
html body .dag-about__formCard,
html body .c-map,
html body .dag-ship__note,
html body .dag-ship__detail,
html body .dag-ship__scenario,
html body .dag-ship__bullet,
html body .dag-ship__faq {
  border-radius: var(--s8-radius-md) !important;
  overflow: hidden;
}

html body .dag-about__icon,
html body .dag-about__checks li,
html body .c-hours__row,
html body .c-notice {
  border-radius: var(--s8-radius-md) !important;
}

html body .dag-ship .dag-btn,
html body .dag-ship__cta,
html body .dag-ship .dag-btn--small,
html body .shipping-page.shipping-page .dag-btn.dag-btn,
html body .iz-leads-form button,
html body .iz-leads-form input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
html body .iz-leads-form select,
html body .iz-leads-form textarea {
  border-radius: var(--s8-radius-sm) !important;
}

html body .iz-leads-financing-page .iz-leads-page-inner,
html body .iz-leads-financing-page .iz-leads-form {
  border-radius: var(--s8-radius-lg) !important;
}

html body .dag-fineprint-dot {
  border-radius: 50% !important;
}

/* === V3.6: HIGH-CONTRAST SOLD STATE =======================================
   Solid red + white edge stays legible over light, dark, or busy vehicle art. */
html body .hw-badge--sold,
html body .cyp-inv__sold,
html body .dag-sold-badge {
  z-index: 9 !important;
  padding: 9px 14px !important;
  border: 1px solid rgba(255, 255, 255, .92) !important;
  border-left: 4px solid #fff !important;
  border-radius: var(--s8-radius-xs) !important;
  background: #b91c1c !important;
  color: #fff !important;
  opacity: 1 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45) !important;
  box-shadow: 0 7px 20px rgba(0, 0, 0, .55), 0 0 0 3px rgba(185, 28, 28, .24) !important;
  backdrop-filter: none !important;
}

html body .hw-card.is-sold .hw-card__media img {
  filter: saturate(.72) brightness(.82);
}

html body .hw-price--sold,
html body .cyp-inv__price-sold,
html body .dag-price.is-sold {
  display: inline-flex !important;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px !important;
  border: 1px solid rgba(255, 255, 255, .65) !important;
  border-radius: var(--s8-radius-sm) !important;
  background: #b91c1c !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: .1em !important;
  text-transform: uppercase !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4) !important;
}

/* === V3.7: UNIVERSAL FOOTER BREATHING ROOM ================================
   The stock map-first layout left four equal columns in too little width.
   Contact gets deliberate space; long addresses/emails wrap by words. */
html body .iz-uf--map-first .iz-uf__content {
  grid-template-columns: minmax(300px, 40%) minmax(0, 1fr) !important;
  gap: clamp(30px, 3vw, 44px) !important;
}

html body .iz-uf .iz-uf__columns {
  grid-template-columns: minmax(92px, .9fr) minmax(190px, 1.9fr) minmax(120px, 1.15fr) minmax(100px, .95fr) !important;
  gap: clamp(16px, 1.7vw, 26px) !important;
}

html body .iz-uf .iz-uf__columns p,
html body .iz-uf .iz-uf__columns li {
  overflow-wrap: break-word !important;
  word-break: normal !important;
  hyphens: none !important;
}

html body .iz-uf .iz-uf__columns section:nth-child(2) a {
  font-size: 14px;
}

html body .iz-uf .iz-uf__columns h3 {
  margin-bottom: 14px !important;
}

html body .iz-uf .iz-uf__columns p,
html body .iz-uf .iz-uf__columns li,
html body .iz-uf .iz-uf__columns a,
html body .iz-uf .iz-uf__columns span,
html body .iz-uf .iz-uf__columns strong {
  line-height: 1.55 !important;
}

html body .iz-uf .iz-uf__map iframe {
  border-radius: var(--s8-radius-md) !important;
}

@media (max-width: 1080px) {
  html body .iz-uf--map-first .iz-uf__content {
    display: flex !important;
    flex-direction: column;
  }

  html body .iz-uf--map-first .iz-uf__map {
    order: -1;
    width: 100%;
  }

  html body .iz-uf .iz-uf__columns {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  html body .hw-badge--sold,
  html body .cyp-inv__sold,
  html body .dag-sold-badge {
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  html body .iz-uf .iz-uf__columns {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }
}

/* VDP inventory labels: keep field names readable on the dark specs card. */
html body.single-car .s8-specs .dag-specs dt {
  color: var(--s8-muted);
  opacity: 1;
}
