/* =====================================================================
   Save Financial — Compliance & Accessibility Styles
   ===================================================================== */

/* -------- Skip to content link -------- */
#sf-skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 100000;
  background: #203080;
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s ease;
  font-size: 1rem;
}
#sf-skip-link:focus {
  top: 0;
  outline: 3px solid #f08030;
  outline-offset: 2px;
}

/* =====================================================================
   COOKIE BANNER
   ===================================================================== */
#sf-cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 99990;
  background: #203080;
  color: #fff;
  box-shadow: 0 -4px 24px rgba(0,0,0,.25);
  transform: translateY(110%);
  transition: transform .35s cubic-bezier(.16,1,.3,1);
  font-family: var(--font-body, system-ui, sans-serif);
}
#sf-cookie-banner.sf-visible { transform: translateY(0); }

.sf-cookie-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.sf-cookie-text {
  flex: 1 1 420px;
  font-size: .92rem;
  line-height: 1.5;
  color: rgba(255,255,255,.95);
}
.sf-cookie-text strong { color: #fff; }
.sf-cookie-text a {
  color: #ffd9b8;
  text-decoration: underline;
  font-weight: 600;
}
.sf-cookie-text a:hover { color: #fff; }

.sf-cookie-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
}

.sf-btn {
  font-family: inherit;
  font-size: .9rem;
  font-weight: 700;
  padding: .65rem 1.2rem;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.sf-btn-primary {
  background: #f08030;
  color: #fff;
}
.sf-btn-primary:hover { background: #d96b1f; }
.sf-btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.5);
}
.sf-btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.sf-btn:focus-visible {
  outline: 3px solid #ffd9b8;
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .sf-cookie-inner { flex-direction: column; align-items: stretch; padding: 1rem; }
  .sf-cookie-actions { justify-content: stretch; }
  .sf-cookie-actions .sf-btn { flex: 1 1 auto; text-align: center; }
}

/* =====================================================================
   ACCESSIBILITY TRIGGER BUTTON
   ===================================================================== */
#sf-a11y-trigger {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 99980;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #203080;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, background .15s ease;
}
#sf-a11y-trigger:hover { background: #f08030; transform: scale(1.08); }
#sf-a11y-trigger:focus-visible { outline: 3px solid #f08030; outline-offset: 3px; }

/* =====================================================================
   ACCESSIBILITY PANEL
   ===================================================================== */
#sf-a11y-panel {
  position: fixed;
  left: 18px;
  bottom: 82px;
  z-index: 99981;
  width: 320px;
  max-width: calc(100vw - 36px);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 48px rgba(0,0,0,.28);
  border: 1px solid #e2e2e2;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  font-family: var(--font-body, system-ui, sans-serif);
}
#sf-a11y-panel.sf-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sf-a11y-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: #203080;
  color: #fff;
  border-radius: 14px 14px 0 0;
}
.sf-a11y-head h2 { margin: 0; font-size: 1.05rem; color: #fff; font-family: var(--font-display, serif); }
#sf-a11y-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 .3rem;
  border-radius: 4px;
}
#sf-a11y-close:hover { color: #ffd9b8; }
#sf-a11y-close:focus-visible { outline: 2px solid #ffd9b8; }

.sf-a11y-body { padding: 1.1rem 1.25rem 1.25rem; }

.sf-a11y-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.sf-a11y-label { font-weight: 700; color: #203080; font-size: .95rem; }

.sf-a11y-stepper {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.sf-a11y-stepper button {
  width: 36px; height: 36px;
  border: 2px solid #203080;
  background: #fff;
  color: #203080;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: .9rem;
}
.sf-a11y-stepper button:hover { background: #203080; color: #fff; }
.sf-a11y-stepper button:focus-visible { outline: 2px solid #f08030; outline-offset: 2px; }
#sf-font-val { min-width: 48px; text-align: center; font-weight: 700; font-size: .9rem; }

.sf-a11y-segment {
  display: flex;
  border: 2px solid #203080;
  border-radius: 8px;
  overflow: hidden;
}
.sf-a11y-segment button {
  background: #fff;
  color: #203080;
  border: none;
  padding: .45rem .7rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  border-right: 1px solid #203080;
}
.sf-a11y-segment button:last-child { border-right: none; }
.sf-a11y-segment button:hover { background: #eef1fb; }
.sf-a11y-segment button.sf-active { background: #203080; color: #fff; }
.sf-a11y-segment button:focus-visible { outline: 2px solid #f08030; outline-offset: -2px; }

.sf-a11y-toggle {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 0;
  font-size: .92rem;
  color: #2a2a2a;
  cursor: pointer;
  border-top: 1px solid #eee;
}
.sf-a11y-toggle input { width: 18px; height: 18px; accent-color: #203080; cursor: pointer; }

.sf-a11y-reset {
  width: 100%;
  margin-top: .9rem;
  padding: .65rem;
  background: #f4f1ed;
  border: 1px solid #d8d2c8;
  color: #203080;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}
.sf-a11y-reset:hover { background: #ece7df; }
.sf-a11y-reset:focus-visible { outline: 2px solid #f08030; outline-offset: 2px; }

.sf-a11y-note {
  margin-top: 1rem;
  font-size: .76rem;
  line-height: 1.5;
  color: #666;
}
.sf-a11y-note a { color: #203080; font-weight: 600; }

/* =====================================================================
   ACCESSIBILITY MODE OVERRIDES (applied to <html>)
   ===================================================================== */

/* Font scaling */
html.sf-a11y-font { font-size: var(--sf-a11y-font-scale, 100%); }

/* High contrast mode */
html.sf-a11y-contrast-high body,
html.sf-a11y-contrast-high {
  background: #fff !important;
}
html.sf-a11y-contrast-high body * {
  color: #000 !important;
  border-color: #000 !important;
}
html.sf-a11y-contrast-high a,
html.sf-a11y-contrast-high a * { color: #00309c !important; text-decoration: underline !important; }
html.sf-a11y-contrast-high .btn,
html.sf-a11y-contrast-high button:not(#sf-a11y-close):not(.sf-a11y-segment button):not(.sf-a11y-stepper button) {
  background: #000 !important;
  color: #fff !important;
  border: 2px solid #000 !important;
}
/* keep our widgets usable in high contrast */
html.sf-a11y-contrast-high #sf-a11y-panel *,
html.sf-a11y-contrast-high #sf-cookie-banner * { color: inherit !important; }

/* Dark mode */
html.sf-a11y-contrast-dark body,
html.sf-a11y-contrast-dark {
  background: #14161c !important;
}
html.sf-a11y-contrast-dark body :not(#sf-a11y-panel):not(#sf-a11y-panel *):not(#sf-cookie-banner):not(#sf-cookie-banner *):not(#sf-a11y-trigger):not(#sf-a11y-trigger *) {
  background-color: transparent !important;
  color: #e8e8ea !important;
  border-color: #3a3d47 !important;
}
html.sf-a11y-contrast-dark a:not(.btn) { color: #ffae6e !important; }
html.sf-a11y-contrast-dark img { opacity: .92; }

/* Underline all links */
html.sf-a11y-underline a { text-decoration: underline !important; }

/* Readable font */
html.sf-a11y-readable,
html.sf-a11y-readable body,
html.sf-a11y-readable * {
  font-family: Verdana, Arial, "Helvetica Neue", sans-serif !important;
  letter-spacing: .02em !important;
  line-height: 1.7 !important;
}

/* Large cursor */
html.sf-a11y-bigcursor,
html.sf-a11y-bigcursor * {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M6 2l30 18-13 3 8 16-6 3-8-16-11 9z" fill="%23000" stroke="%23fff" stroke-width="2"/></svg>') 4 2, auto !important;
}

/* Reduce / pause motion */
html.sf-a11y-pausemotion *,
html.sf-a11y-pausemotion *::before,
html.sf-a11y-pausemotion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}

/* Highlight focus */
html.sf-a11y-focus *:focus,
html.sf-a11y-focus *:focus-visible {
  outline: 4px solid #f08030 !important;
  outline-offset: 2px !important;
}

/* Respect system reduced-motion by default too */
@media (prefers-reduced-motion: reduce) {
  #sf-cookie-banner, #sf-a11y-panel, #sf-a11y-trigger { transition: none !important; }
}

@media (max-width: 480px) {
  #sf-a11y-trigger { left: 12px; bottom: 12px; width: 48px; height: 48px; }
  #sf-a11y-panel { left: 12px; bottom: 72px; }
}


/* When cookie banner is showing, lift the accessibility button above it */
body.sf-banner-active #sf-a11y-trigger {
  bottom: 150px;
}
body.sf-banner-active #sf-a11y-panel {
  bottom: 214px;
}
@media (max-width: 720px) {
  body.sf-banner-active #sf-a11y-trigger { bottom: 220px; }
  body.sf-banner-active #sf-a11y-panel { bottom: 280px; }
}


/* Dark mode — keep form fields and buttons readable */
html.sf-a11y-contrast-dark input,
html.sf-a11y-contrast-dark select,
html.sf-a11y-contrast-dark textarea {
  background: #1f222b !important;
  color: #f0f0f2 !important;
  border-color: #4a4e5a !important;
}
html.sf-a11y-contrast-dark input::placeholder,
html.sf-a11y-contrast-dark textarea::placeholder { color: #9aa0ad !important; }
html.sf-a11y-contrast-dark .btn,
html.sf-a11y-contrast-dark button[type="submit"],
html.sf-a11y-contrast-dark .btn-secondary,
html.sf-a11y-contrast-dark .btn-primary {
  background: #f08030 !important;
  color: #14161c !important;
  border-color: #f08030 !important;
  font-weight: 700 !important;
}
html.sf-a11y-contrast-dark .card,
html.sf-a11y-contrast-dark .quote-card,
html.sf-a11y-contrast-dark .program-card,
html.sf-a11y-contrast-dark [class*="card"] {
  background: #1c1f27 !important;
  border-color: #3a3d47 !important;
}

/* =====================================================================
   $500 BEST PRICE GUARANTEE PROMO BAR
   ===================================================================== */
#sf-promo-bar {
  background: linear-gradient(90deg, #f08030 0%, #e0701f 100%);
  color: #fff;
  font-family: var(--font-body, system-ui, sans-serif);
  position: relative;
  z-index: 99970;
}
.sf-promo-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: .6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  flex-wrap: wrap;
  position: relative;
}
.sf-promo-badge {
  background: #fff;
  color: #d96b1f;
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .04em;
  padding: .28rem .6rem;
  border-radius: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.sf-promo-text {
  font-size: .92rem;
  line-height: 1.4;
  text-align: center;
}
.sf-promo-text strong { font-weight: 800; }
.sf-promo-text a {
  color: #fff;
  text-decoration: underline;
  font-weight: 700;
  white-space: nowrap;
}
.sf-promo-text a:hover { color: #fff5ec; }
#sf-promo-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.85);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 .25rem;
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
}
#sf-promo-close:hover { color: #fff; }
#sf-promo-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 3px; }

@media (max-width: 640px) {
  .sf-promo-inner { padding: .55rem 2.4rem .55rem 1rem; gap: .5rem; }
  .sf-promo-text { font-size: .82rem; }
  .sf-promo-badge { font-size: .65rem; }
}
