/* ==========================================================================
   SkySearch Reach & Guarantee Styling
   Matches design tokens from assets/css/skysearch.css and app/src/styles.css.
   ========================================================================== */

/* --- Refund Guaranteed Badge ---------------------------------------------- */
.reach-guarantee-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #FFFFFF;
  border: 1px solid rgba(29, 74, 154, 0.35); /* Cobalt hairline */
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 2px 8px rgba(15, 27, 45, 0.05);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reach-guarantee-badge__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(20, 113, 58, 0.1);
  color: #14713A; /* State green return/check accent */
  flex-shrink: 0;
}

.reach-guarantee-badge__sparkle {
  color: #14713A;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.reach-guarantee-badge__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reach-guarantee-badge__title {
  font-family: Inter, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1E3A6E; /* Cobalt/navy text */
  letter-spacing: -0.01em;
}

.reach-guarantee-badge__body {
  font-family: Inter, sans-serif;
  font-size: 0.8rem;
  color: #33415A;
  line-height: 1.35;
}

/* One-shot highlight & sparkle sweep: played once, transform and opacity only, settles */
.reach-guarantee-badge--active {
  border-color: #1D4A9A;
  box-shadow: 0 4px 14px rgba(29, 74, 154, 0.15);
}

.reach-guarantee-badge--active .reach-guarantee-badge__sparkle {
  animation: reach-sparkle-pop 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reach-guarantee-badge--active::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(29, 74, 154, 0.12), transparent);
  animation: reach-highlight-sweep 0.75s ease-out forwards;
}

@keyframes reach-sparkle-pop {
  0% { transform: scale(0.85) rotate(-15deg); opacity: 0.7; }
  50% { transform: scale(1.2) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes reach-highlight-sweep {
  0% { transform: translateX(0%); }
  100% { transform: translateX(350%); }
}

@media (prefers-reduced-motion: reduce) {
  .reach-guarantee-badge--active .reach-guarantee-badge__sparkle,
  .reach-guarantee-badge--active::after {
    animation: none;
  }
}

/* --- Global Return Toast -------------------------------------------------- */
.global-return-toast {
  position: fixed;
  top: 68px;
  right: 24px;
  z-index: 1000;
  max-width: 440px;
  background: #FFFFFF;
  border: 1px solid #14713A; /* State green return */
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(15, 27, 45, 0.12);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: toast-slide-in 0.3s ease-out forwards;
}

@keyframes toast-slide-in {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .global-return-toast {
    animation: none;
  }
}

.global-return-toast__icon {
  color: #14713A;
  background: rgba(20, 113, 58, 0.1);
  padding: 6px;
  border-radius: 8px;
  flex-shrink: 0;
}

.global-return-toast__body {
  flex: 1;
}

.global-return-toast__title {
  display: block;
  font-family: Inter, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #14713A;
  margin-bottom: 3px;
}

.global-return-toast__text {
  font-family: Inter, sans-serif;
  font-size: 0.85rem;
  color: #33415A;
  line-height: 1.4;
  margin: 0;
}

.global-return-toast__close {
  background: transparent;
  border: none;
  color: #5C6B80;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.global-return-toast__close:hover,
.global-return-toast__close:focus-visible {
  color: #0F1B2D;
  background: #F5F7FA;
}

@media (max-width: 600px) {
  .global-return-toast {
    top: auto;
    bottom: 20px;
    left: 16px;
    right: 16px;
    max-width: none;
  }
}

/* --- Terminal Outcome Cards inside Resolve -------------------------------- */
.reach-outcome-card {
  margin-top: 1.25rem;
}

.reach-outcome-card__box {
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #FFFFFF;
}

.reach-outcome-card--success {
  border-color: #E6B45A;
  background: #FFFDF9;
}

.reach-outcome-card--success strong {
  display: block;
  font-size: 1.1rem;
  color: #7A4F0E;
  margin-bottom: 4px;
}

.reach-outcome-card--returned {
  border-color: #14713A;
  background: #F7FCF9;
}

.reach-outcome-card--returned strong {
  display: block;
  font-size: 1.1rem;
  color: #14713A;
  margin-bottom: 4px;
}

.reach-outcome-card--pending {
  border-color: #1D4A9A;
  background: #F8FAFD;
}

.reach-outcome-card--pending strong {
  display: block;
  font-size: 1.1rem;
  color: #1D4A9A;
  margin-bottom: 4px;
}

.reach-outcome-card__box p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: #33415A;
}

.reach-outcome-balance {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0F1B2D;
}

.reach-outcome-note {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #5C6B80;
}

/* --- Reach Pricing Component Styling ------------------------------------- */
.reach-pricing-container {
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
}

.reach-pricing-hero {
  margin-bottom: 1.5rem;
}

.reach-pricing-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1E3A6E;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.reach-pricing-lede {
  font-size: 1rem;
  color: #33415A;
  max-width: 680px;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.reach-guarantee-wrapper {
  margin-bottom: 1.5rem;
}

.reach-calculator-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(15, 27, 45, 0.04);
}

.reach-selector-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 1.25rem;
}

.reach-input-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0F1B2D;
  margin-bottom: 6px;
}

.reach-number-field-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reach-number-field {
  font-family: JetBrains Mono, monospace;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1D4A9A;
  width: 100px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #FFFFFF;
}

.reach-number-suffix {
  font-size: 0.95rem;
  font-weight: 600;
  color: #5C6B80;
}

.reach-presets-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.reach-presets-label {
  font-size: 0.85rem;
  color: #5C6B80;
}

/* Wraps, because at 320px — and at any width once the text is scaled to 150% —
   a single row of preset pills is wider than the pane, and a non-wrapping flex
   row does not shrink: it sets a min-content width the whole page inherits and
   scrolls sideways behind. */
.reach-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reach-preset-pill {
  border: 1px solid var(--line);
  background: #F5F7FA;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #33415A;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reach-preset-pill:hover,
.reach-preset-pill:focus-visible {
  border-color: #1D4A9A;
  color: #1D4A9A;
}

.reach-preset-pill--active {
  background: #1D4A9A;
  color: #FFFFFF;
  border-color: #1D4A9A;
}

.reach-cadence-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.reach-cadence-btn {
  flex: 1;
  text-align: left;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
}

.reach-cadence-btn strong {
  display: block;
  font-size: 0.95rem;
  color: #0F1B2D;
}

.reach-cadence-btn small {
  display: block;
  font-size: 0.8rem;
  color: #5C6B80;
}

.reach-cadence-btn--active {
  border-color: #1D4A9A;
  background: #F8FAFD;
}

.reach-cadence-btn--active strong {
  color: #1D4A9A;
}

/* Offers layout */
.reach-offers-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 24px;
}

@media (max-width: 840px) {
  .reach-offers-layout {
    grid-template-columns: 1fr;
  }
}

.reach-plan-spotlight {
  background: #FFFFFF;
  border: 2px solid #1D4A9A;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(29, 74, 154, 0.08);
}

.reach-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.reach-tag--cobalt {
  background: rgba(29, 74, 154, 0.1);
  color: #1D4A9A;
}

.reach-tag--gold {
  background: rgba(230, 180, 90, 0.2);
  color: #7A4F0E;
}

.reach-tag--trial {
  background: #EBF3EA;
  color: #14713A;
}

.reach-spotlight-name {
  font-size: 1.5rem;
  color: #1E3A6E;
  margin-bottom: 8px;
}

.reach-spotlight-price {
  margin-bottom: 8px;
}

.reach-price-main {
  font-family: JetBrains Mono, monospace;
  font-size: 2.2rem;
  font-weight: 700;
  color: #0F1B2D;
}

.reach-price-cadence {
  font-size: 0.95rem;
  color: #5C6B80;
  margin-left: 6px;
}

.reach-spotlight-metric {
  font-size: 0.95rem;
  color: #33415A;
  margin-bottom: 18px;
}

.reach-spotlight-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.reach-spotlight-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #33415A;
  margin-bottom: 10px;
}

.reach-icon-check {
  color: #14713A;
  flex-shrink: 0;
}

.reach-spotlight-cta {
  width: 100%;
}

.reach-adjacent-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reach-adjacent-card {
  background: #F5F7FA;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.reach-adjacent-info h4 {
  font-size: 1rem;
  color: #1E3A6E;
  margin-bottom: 4px;
}

.reach-adjacent-info p {
  font-size: 0.85rem;
  color: #5C6B80;
  margin: 0;
  line-height: 1.4;
}

/* One-time layout */
.reach-onetime-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 800px) {
  .reach-onetime-layout {
    grid-template-columns: 1fr;
  }
}

.reach-onetime-card {
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}

.reach-onetime-price {
  font-family: JetBrains Mono, monospace;
  font-size: 2rem;
  font-weight: 700;
  color: #0F1B2D;
  margin: 8px 0;
}

.reach-onetime-desc {
  font-size: 0.95rem;
  color: #14713A;
  margin-bottom: 8px;
}

.reach-onetime-sub {
  font-size: 0.88rem;
  color: #5C6B80;
  margin-bottom: 18px;
}

.reach-topups-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reach-topup-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
}

.reach-topup-info strong {
  display: block;
  font-size: 0.92rem;
  color: #0F1B2D;
}

.reach-topup-info span {
  display: block;
  font-size: 0.8rem;
  color: #5C6B80;
}

.reach-workflows-bar {
  margin-top: 2rem;
  padding: 14px 18px;
  border-radius: 8px;
  background: #F5F7FA;
  border: 1px solid var(--line);
}

.reach-workflows-line {
  margin: 0;
  font-size: 0.88rem;
  color: #33415A;
  line-height: 1.4;
}


/* --------------------------------------------------------------------------
   Narrow and zoomed.

   /app/plans scrolled sideways by 8px at 320px and by 55px at 150% text. Every
   cause was the same shape: a flex row that could not wrap, or a fixed
   min-width on a control. Text that is scaled up is the same problem as a
   narrow screen and is far more common — a reader with low vision meets it on a
   1440px monitor — so these are bounded by content, not by viewport.
   -------------------------------------------------------------------------- */
.reach-pricing-container,
.reach-calculator-card,
.reach-offers-layout,
.reach-onetime-layout {
  min-width: 0;
  max-width: 100%;
}
.reach-number-field-wrap,
.reach-input-group,
.reach-presets-group {
  min-width: 0;
}
.reach-number-field {
  max-width: 100%;
}
.reach-spotlight-features li,
.reach-adjacent-card,
.reach-topup-row {
  min-width: 0;
}
.reach-spotlight-name,
.reach-price-main,
.reach-guarantee-badge__body {
  overflow-wrap: anywhere;
}
@media (max-width: 520px) {
  .reach-cadence-btn {
    flex: 1 1 100%;
  }
  .reach-adjacent-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --------------------------------------------------------------------------
   The Reach Promise drawing.

   It shipped with no stylesheet at all — every rule below was missing, so the
   SVG sat flush against the copy above it at whatever height the viewBox
   implied. It is decorative: the sentence in its aria-label carries the meaning,
   and it is hidden outright on a narrow screen, where 180px of illustration is
   180px of the reader's phone not spent on the form they came to fill in.
   -------------------------------------------------------------------------- */
.reach-promise-visual {
  margin: 0.75rem 0 0;
  max-width: 34rem;
}
.reach-promise-svg {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 760px), (max-height: 700px) {
  .reach-promise-visual {
    display: none;
  }
}
