/* Shared component styles for the ESA Pay public website.
   Plain CSS (not processed by Tailwind) so every page can share it without a build step. */

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-feature-settings: 'cv11', 'ss01'; text-rendering: optimizeLegibility; }

:focus-visible { outline: 3px solid #2457D6; outline-offset: 2px; border-radius: 6px; }
.on-dark :focus-visible { outline-color: #FFFFFF; }

[id] { scroll-margin-top: 88px; }

/* Layout */
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }

/* Buttons & links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: 0 1.25rem; border-radius: 8px;
  font-weight: 600; font-size: 15px; line-height: 1; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn-lg { min-height: 52px; padding: 0 1.5rem; font-size: 16px; }
.btn-primary { background: #2457D6; color: #FFFFFF; }
.btn-primary:hover { background: #1C45B0; }
.btn-secondary { background: #FFFFFF; color: #152238; box-shadow: inset 0 0 0 1px #DCE2EA; }
.btn-secondary:hover { box-shadow: inset 0 0 0 1px #152238; }
.btn-light { background: #FFFFFF; color: #152238; }
.btn-light:hover { background: #DCE6FB; }
.btn-outline-light { color: #FFFFFF; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.btn-outline-light:hover { box-shadow: inset 0 0 0 1px #FFFFFF; }
.btn[disabled] { opacity: .6; cursor: progress; }

.link { color: #2457D6; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.link:hover { color: #1C45B0; text-decoration-thickness: 2px; }
.link-arrow { color: #2457D6; font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; }
.link-arrow:hover { color: #1C45B0; }
.link-arrow::after { content: '→'; transition: transform .15s ease; }
.link-arrow:hover::after { transform: translateX(3px); }

/* The hidden attribute always wins over Tailwind display utilities (used for unconfigured links). */
[hidden] { display: none !important; }

/* Navigation (navbar.md) — one component for both audiences */
.nav-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 500; color: #526174; transition: color .15s ease; }
.nav-link:hover, .nav-link[aria-current='page'] { color: #152238; }
.nav-switch { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; background: #F4F6FA; color: #152238; font-size: 15px; font-weight: 500; transition: background-color .15s ease; }
.nav-switch:hover { background: #E6EAF1; }
.btn-pill { border-radius: 999px; padding: 0 1.25rem; white-space: nowrap; }
@media (max-width: 639px) { header .btn-pill { height: 40px; padding: 0 .875rem; font-size: 14px; } }
@media (max-width: 359px) { header .btn-pill { padding: 0 .625rem; } header [data-nav-toggle] { width: 40px; } header nav > a img { height: 22px !important; } }
.mobile-link { display: flex; align-items: center; min-height: 52px; padding: 0 .25rem; font-size: 17px; font-weight: 500; color: #152238; border-bottom: 1px solid #DCE2EA; }
.mobile-link[aria-current='page'] { color: #2457D6; }
.mobile-switch { display: flex; align-items: center; justify-content: space-between; min-height: 52px; margin-bottom: .5rem; padding: 0 1rem; border-radius: 12px; background: #F4F6FA; font-size: 17px; font-weight: 600; color: #152238; }

/* Typographic helpers */
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #2457D6; }
.on-dark .eyebrow { color: #A9C1F5; }

/* Coming soon label — used at every mention of a roadmap feature */
.soon-badge {
  display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px;
  background: #FFF4DB; color: #7A4B00; box-shadow: inset 0 0 0 1px #F2D9A0;
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
}
.soon-badge::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

.concept-label {
  display: inline-flex; align-items: center; padding: .2rem .55rem; border-radius: 6px;
  border: 1px dashed currentColor; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}

/* ESA Pay buttons: use the official SVGs in /assets/marks/ (see the spec at /assets/marks/#button-spec). */

/* FAQ accordions (native <details>) */
.faq details { border-bottom: 1px solid #DCE2EA; }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 64px; padding: 1rem 0; font-size: 17px; font-weight: 600; color: #152238;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 12px; height: 12px; margin-right: 4px;
  border-right: 2px solid #526174; border-bottom: 2px solid #526174; transform: rotate(45deg) translateY(-3px);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq .answer { padding: 0 0 1.25rem; color: #526174; max-width: 68ch; line-height: 1.65; }
.faq .answer p + p { margin-top: .75rem; }

/* Forms */
.field-label { display: block; font-size: 14px; font-weight: 600; color: #152238; margin-bottom: .4rem; }
.field {
  width: 100%; min-height: 48px; padding: .65rem .9rem; border-radius: 8px; background: #FFFFFF;
  border: 1px solid #B6C0CE; color: #152238; font-size: 16px;
}
.field:focus { outline: 3px solid rgba(36,87,214,.35); outline-offset: 0; border-color: #2457D6; }
.field[aria-invalid='true'] { border-color: #B42318; }
.check { display: flex; align-items: flex-start; gap: .65rem; min-height: 44px; padding: .5rem 0; font-size: 15px; color: #152238; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: #2457D6; flex: none; }
.form-error { color: #B42318; font-size: 14px; font-weight: 500; }
.on-dark .form-error { color: #FFB4AB; }

/* Tabular numerals for pricing */
.tnum { font-variant-numeric: tabular-nums; }

/* Gentle float for decorative product imagery */
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.float-slow { animation: float-y 7s ease-in-out infinite; }
.float-slower { animation: float-y 9s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Let grid items shrink below their content width (prevents horizontal overflow at 320px) */
.grid > * { min-width: 0; }
