/* BUILD_ADDON_244: Unified chrome and button color system.
   Loaded after every other stylesheet and inline style block on index.html so it is the final word.
   Goals: one calm neutral button style, one warm accent for the primary action, readable text in
   both Nighttime and Daytime modes, a slim brand stripe with an icon-only Settings gear, and a
   compact two-row top bar with no stray gaps. */

/* Design tokens */
html,
html[data-theme="dark"] {
  --u-bar-bg: rgba(17, 19, 23, 0.97);
  --u-stripe-bg: #0C0E12;
  --u-surface: #1C2028;
  --u-btn-bg: #262A33;
  --u-btn-bg-hover: #313743;
  --u-btn-fg: #F3F4F6;
  --u-btn-border: #434B59;
  --u-muted: #AEB6C2;
  --u-accent: #D99B26;
  --u-accent-hover: #E7AB3A;
  --u-accent-fg: #15110A;
  --u-danger: #F87171;
  --u-focus: #FBBF24;
  --u-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
html[data-theme="light"] {
  --u-bar-bg: rgba(255, 255, 255, 0.97);
  --u-stripe-bg: #F3F4F6;
  --u-surface: #FFFFFF;
  --u-btn-bg: #FFFFFF;
  --u-btn-bg-hover: #F1F5F9;
  --u-btn-fg: #111827;
  --u-btn-border: #C7CED9;
  --u-muted: #475569;
  --u-accent: #B45309;
  --u-accent-hover: #92400E;
  --u-accent-fg: #FFFFFF;
  --u-danger: #B91C1C;
  --u-focus: #B45309;
  --u-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* Top bar shell */
html body #bsp-master-top-bar.top-bar {
  background: var(--u-bar-bg) !important;
  border-bottom: 1px solid var(--u-btn-border) !important;
  box-shadow: var(--u-shadow) !important;
  padding: 0 clamp(6px, 2vw, 16px) 5px !important;
  gap: 4px !important;
  max-height: none;
}

/* Brand stripe */
html body #bsp-brand-stripe {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 6px !important;
  width: calc(100% + 2 * clamp(6px, 2vw, 16px)) !important;
  max-width: none !important;
  margin: 0 calc(-1 * clamp(6px, 2vw, 16px)) 1px !important;
  padding: 3px clamp(6px, 2vw, 16px) !important;
  background: var(--u-stripe-bg) !important;
  border-bottom: 1px solid var(--u-btn-border) !important;
  box-sizing: border-box !important;
  pointer-events: auto !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}
html body #bsp-brand-stripe .bsp-brand-stripe-text {
  all: unset;
  min-width: 0;
  min-height: 0 !important;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  column-gap: 5px;
  row-gap: 0;
  text-align: center;
  cursor: pointer;
  line-height: 1.2 !important;
  height: auto !important;
  max-height: none !important;
  width: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  white-space: normal !important;
  color: var(--u-btn-fg) !important;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
html body #bsp-brand-stripe .bsp-brand-stripe-text:focus-visible {
  outline: 2px solid var(--u-focus);
  outline-offset: 2px;
  border-radius: 4px;
}
html body #bsp-brand-stripe .bsp-brand-name {
  font-size: clamp(10px, 2.75vw, 14px) !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--u-btn-fg) !important;
  white-space: nowrap;
}
html body #bsp-brand-stripe .bsp-brand-dot {
  font-size: clamp(10px, 2.75vw, 14px) !important;
  color: var(--u-accent) !important;
  font-weight: 800;
}
html body #bsp-brand-stripe .bsp-brand-tagline {
  font-size: clamp(10px, 2.75vw, 14px) !important;
  font-weight: 600 !important;
  color: var(--u-accent) !important;
  white-space: nowrap;
}
html body #bsp-brand-stripe .bsp-brand-badge {
  flex-basis: 100%;
  font-size: clamp(8.5px, 2.25vw, 11.5px) !important;
  font-weight: 600 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--u-muted) !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 820px) {
  html body #bsp-brand-stripe .bsp-brand-badge {
    flex-basis: auto;
  }
  html body #bsp-brand-stripe .bsp-brand-badge::before {
    content: "|";
    margin-right: 6px;
    color: var(--u-btn-border);
  }
}

/* Icon-only Settings gear: a small square that never steals a row. */
html body #bsp-brand-stripe #bsp-settings-hub-btn.bsp-gear-btn {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
  background: var(--u-btn-bg) !important;
  border: 1px solid var(--u-btn-border) !important;
  color: var(--u-btn-fg) !important;
  box-shadow: none !important;
  cursor: pointer !important;
  font-size: 0 !important;
  letter-spacing: 0 !important;
  position: relative;
}
@media (pointer: coarse) {
  /* Keeps the visible gear small while giving fingers a 44px target. */
  html body #bsp-brand-stripe #bsp-settings-hub-btn.bsp-gear-btn::after {
    content: "";
    position: absolute;
    inset: -7px;
  }
}
html body #bsp-brand-stripe #bsp-settings-hub-btn.bsp-gear-btn:hover {
  background: var(--u-btn-bg-hover) !important;
  color: var(--u-accent) !important;
}
html body #bsp-brand-stripe #bsp-settings-hub-btn.bsp-gear-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}
html body #bsp-brand-stripe #bsp-settings-hub-btn.bsp-gear-btn:hover svg {
  transform: rotate(45deg);
}

/* Button rows: no stray gaps. The hidden language select must never take a grid cell. */
html body #bsp-master-top-bar #bsp-global-lang-select[hidden],
html body #bsp-master-top-bar #bsp-global-lang-select[aria-hidden="true"] {
  display: none !important;
}
html body #bsp-master-top-bar .top-bar-row {
  gap: 4px !important;
}
html body #bsp-master-top-bar .top-bar-row-1 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
html body #bsp-master-top-bar .top-bar-row-2 {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

/* One uniform top bar button style */
html body #bsp-master-top-bar .top-bar-row > button,
html body #bsp-master-top-bar .top-bar-row > select:not([hidden]),
html body #bsp-master-top-bar .top-bar-row > .top-bar-uniform-btn {
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  background: var(--u-btn-bg) !important;
  border: 1px solid var(--u-btn-border) !important;
  color: var(--u-btn-fg) !important;
  -webkit-text-fill-color: currentColor !important;
  box-shadow: none !important;
  text-shadow: none !important;
  border-radius: 8px !important;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: clamp(10px, 2.6vw, 13px) !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
  padding: 0 4px !important;
  gap: 4px !important;
}
html body #bsp-master-top-bar .top-bar-row > button *,
html body #bsp-master-top-bar .top-bar-row > .top-bar-uniform-btn * {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
  font-size: inherit !important;
  letter-spacing: inherit !important;
}
html body #bsp-master-top-bar .top-bar-row > button:hover,
html body #bsp-master-top-bar .top-bar-row > .top-bar-uniform-btn:hover {
  background: var(--u-btn-bg-hover) !important;
  border-color: var(--u-accent) !important;
}
html body #bsp-master-top-bar .top-bar-row > button:focus-visible {
  outline: 2px solid var(--u-focus) !important;
  outline-offset: 1px !important;
}
/* Wall of Honor keeps its two short lines inside the same 32px height. */
html body #bsp-master-top-bar #btn-wall-of-honor > span:first-child {
  line-height: 1.05 !important;
}
html body #bsp-master-top-bar #btn-wall-of-honor > span:first-child > span {
  font-size: clamp(8.5px, 2.2vw, 11px) !important;
}
/* The single accent: Login is the primary action in the bar. */
html body #bsp-master-top-bar #top-bar-auth-btn {
  background: var(--u-accent) !important;
  border-color: var(--u-accent) !important;
  color: var(--u-accent-fg) !important;
}
html body #bsp-master-top-bar #top-bar-auth-btn:hover {
  background: var(--u-accent-hover) !important;
  border-color: var(--u-accent-hover) !important;
}
/* Day/Night toggle: the inactive mode stays dim, the active one is full strength. */
html body #bsp-master-top-bar #theme-btn [style*="opacity"] {
  opacity: 0.45 !important;
}

/* Hero call to action row */
html body #bsp-hero-call-buttons a.btn-modern {
  background: var(--u-btn-bg) !important;
  border: 1px solid var(--u-btn-border) !important;
  color: var(--u-btn-fg) !important;
  -webkit-text-fill-color: currentColor !important;
  box-shadow: var(--u-shadow) !important;
  text-shadow: none !important;
  border-radius: 10px !important;
}
html body #bsp-hero-call-buttons a.btn-modern[href="/business-suite.html"] {
  background: var(--u-accent) !important;
  border-color: var(--u-accent) !important;
  color: var(--u-accent-fg) !important;
}
html body #bsp-hero-call-buttons a.btn-modern:hover {
  border-color: var(--u-accent) !important;
}
html body #bsp-hero-call-buttons a.btn-modern[href="/business-suite.html"]:hover {
  background: var(--u-accent-hover) !important;
}

/* Hero clock and weather pill stays readable in both modes. */
html body #hero-live-time-weather {
  background: var(--u-surface) !important;
  border: 1px solid var(--u-btn-border) !important;
  color: var(--u-btn-fg) !important;
  box-shadow: none !important;
}
html body #hero-live-time-weather span {
  color: var(--u-btn-fg) !important;
  text-shadow: none !important;
}
html body #hero-live-time-weather span:nth-child(2) {
  color: var(--u-accent) !important;
}

/* Daytime hero card: a light card with dark text instead of a dark gradient with dark text. */
html[data-theme="light"] body .hero-pill {
  background: #FFFFFF !important;
  border-color: var(--u-btn-border) !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08) !important;
}
html[data-theme="light"] body .hero-pill .hero-title {
  color: #111827 !important;
}
html[data-theme="light"] body .hero-pill :is(.hero-subtitle, .hero-sub, p, span):not(#hero-live-time-weather *) {
  color: var(--u-accent) !important;
}
html[data-theme="light"] body .hero-pill #hero-live-time-weather {
  background: #F8FAFC !important;
}

/* Bottom dock: three matching chips */
html body #bsp-floating-dock button.dock-trigger-btn {
  background: var(--u-btn-bg) !important;
  border: 1px solid var(--u-btn-border) !important;
  color: var(--u-btn-fg) !important;
  -webkit-text-fill-color: currentColor !important;
  box-shadow: var(--u-shadow) !important;
  text-shadow: none !important;
}
html body #bsp-floating-dock button.dock-trigger-btn:hover {
  background: var(--u-btn-bg-hover) !important;
  border-color: var(--u-accent) !important;
}
html body #bsp-floating-dock button.dock-trigger-btn .dock-title-text,
html body #bsp-floating-dock button.dock-trigger-btn .dock-title-text * {
  color: var(--u-btn-fg) !important;
  -webkit-text-fill-color: currentColor !important;
}
html body #bsp-floating-dock button.dock-trigger-btn .dock-sub-text,
html body #bsp-floating-dock button.dock-trigger-btn .dock-sub-text * {
  color: var(--u-muted) !important;
  -webkit-text-fill-color: currentColor !important;
}
html body #bsp-floating-dock {
  background: var(--u-bar-bg) !important;
  border-top: 1px solid var(--u-btn-border) !important;
}

/* Site-wide buttons: one neutral style, one accent for primary actions, red only for danger.
   Active tabs and toggles keep their highlight through the accent border. */
html body .btn-modern:not(.top-bar-uniform-btn):not(.dock-trigger-btn) {
  background: var(--u-btn-bg) !important;
  border: 1px solid var(--u-btn-border) !important;
  color: var(--u-btn-fg) !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
  box-shadow: var(--u-shadow) !important;
}
html body .btn-modern:not(.top-bar-uniform-btn):not(.dock-trigger-btn) :is(span, strong, b, em, i, small) {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
}
html body .btn-modern:not(.top-bar-uniform-btn):not(.dock-trigger-btn):hover {
  background: var(--u-btn-bg-hover) !important;
  border-color: var(--u-accent) !important;
}
html body .btn-modern:not(.top-bar-uniform-btn):not(.dock-trigger-btn):is([style*="border-color: var(--brand-gold)"], [style*="solid var(--brand-gold)"], .active, [aria-selected="true"], [aria-current="page"]) {
  border-color: var(--u-accent) !important;
  box-shadow: inset 0 -2px 0 var(--u-accent) !important;
}
html body .btn-modern:not(.top-bar-uniform-btn):not(.dock-trigger-btn):is([style*="background: var(--brand-gold)"], [style*="background: var(--accent-green)"], [style*="background:var(--brand-gold)"], [style*="background:var(--accent-green)"], [style*="background: #F59E0B"], [style*="background: #f59e0b"], [style*="background: #fbbf24"], [aria-pressed="true"], .btn-primary-accent) {
  background: var(--u-accent) !important;
  border-color: var(--u-accent) !important;
  color: var(--u-accent-fg) !important;
}
html body .btn-modern:not(.top-bar-uniform-btn):not(.dock-trigger-btn):is([style*="#ff4d4d"], [style*="#ef4444"], [style*="#dc2626"], [style*="#ff6b6b"], [style*="255,77,77"], [style*="255, 77, 77"]) {
  border-color: var(--u-danger) !important;
  color: var(--u-danger) !important;
}
html body .btn-modern:disabled,
html body .btn-modern[aria-disabled="true"] {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
}
html body .btn-modern:focus-visible {
  outline: 2px solid var(--u-focus) !important;
  outline-offset: 2px !important;
}

/* Daytime mode fixes: text inside dark inline cards and buttons no longer turns dark on dark. */
html[data-theme="light"] body .btn-modern :is(span, strong) {
  color: inherit !important;
}
html[data-theme="light"] body #bsp-master-top-bar :is(span, strong) {
  color: inherit !important;
}
html[data-theme="light"] body #bsp-brand-stripe .bsp-brand-tagline,
html[data-theme="light"] body #bsp-brand-stripe .bsp-brand-dot {
  color: var(--u-accent) !important;
}
html[data-theme="light"] body #bsp-brand-stripe .bsp-brand-badge {
  color: var(--u-muted) !important;
}
html[data-theme="light"] body #bsp-brand-stripe .bsp-brand-name {
  color: var(--u-btn-fg) !important;
}

/* Calm shading: heavy black glows read as smudges, especially in Daytime mode. */
html[data-theme="light"] body :is(.btn-modern, .callout-box, .glass-panel, .hero-pill) {
  text-shadow: none !important;
}
html[data-theme="light"] body .callout-box,
html[data-theme="light"] body .glass-panel {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
}

/* Language menu matches the rest of the chrome. */
html body #bsp-lang-menu {
  background: var(--u-surface) !important;
  border: 1px solid var(--u-btn-border) !important;
  color: var(--u-btn-fg) !important;
}
html body #bsp-lang-menu button {
  background: var(--u-btn-bg) !important;
  color: var(--u-btn-fg) !important;
  border: 1px solid var(--u-btn-border) !important;
}
html body #bsp-lang-menu button[aria-checked="true"] {
  border-color: var(--u-accent) !important;
  box-shadow: inset 3px 0 0 var(--u-accent) !important;
}

/* Medium and Large text sizes: the stripe wraps cleanly instead of overflowing. */
html:is([data-bsp-zoom="medium"], [data-bsp-zoom="large"]) body #bsp-brand-stripe .bsp-brand-badge {
  white-space: normal;
}

@media (prefers-reduced-motion: reduce) {
  html body #bsp-brand-stripe #bsp-settings-hub-btn.bsp-gear-btn svg {
    transition: none;
  }
}

/* Body copy stays crisp: glow shadows are kept for big hero titles only. */
html body :is(p, li, label, small, td, th, dd, dt, .bsp-onepush-card *, #auth-modal *, #side-nav *) {
  text-shadow: none !important;
}

/* Phone numbers in the hero row stay on one line on small phones. */
html body #bsp-hero-call-buttons a.btn-modern {
  letter-spacing: 0.03em !important;
  max-width: 100%;
  box-sizing: border-box;
  justify-content: center;
}
html body #bsp-hero-call-buttons a.btn-modern[href^="tel:"],
html body #bsp-hero-call-buttons a.btn-modern[href^="sms:"] {
  white-space: nowrap !important;
  font-size: clamp(0.9rem, 4vw, 1.05rem) !important;
}
