/*
 * Shared component primitives.
 * Loaded after style.css so page templates can use the same buttons/cards/chips.
 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  background: var(--brand-strong);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:hover { background: #0369a1; color: #fff; }
.btn:focus-visible { outline: 3px solid var(--brand-strong); outline-offset: 3px; }
.btn-secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink-900);
}
.btn-secondary:hover { background: var(--surface-2); color: var(--ink-900); }
.btn-text {
  min-height: 0;
  padding: 0;
  background: transparent;
  color: var(--brand-strong);
}
.btn-text:hover { background: transparent; color: #0369a1; text-decoration: underline; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--brand-50);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.icon-24 {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}
.icon-24 svg { display: block; width: 24px; height: 24px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Complete interactive states for shared components. */
.btn:disabled,
.btn[aria-disabled="true"] {
  background: var(--line);
  color: var(--ink-400);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary:disabled,
.btn-secondary[aria-disabled="true"] {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--ink-400);
}

.chip:focus-visible,
.card:focus-within {
  outline: 2px solid var(--brand-strong);
  outline-offset: 2px;
}

.icon-24 svg,
.feature-icon svg {
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .card,
  .chip {
    transition: none;
  }
}

/* D-P1-10: footer stays centered; add friend-link hierarchy and readable legal. */
.site-footer .footer-friend-links { padding-top: 18px; }
.site-footer .footer-friend-links__title {
  margin: 0 0 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}
.site-footer .footer-friend-links__intro {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, .66);
  font-size: 12px;
  line-height: 1.6;
}
.site-footer .footer-legal,
.site-footer .footer-legal-text p,
.site-footer .footer-legal-text a { font-size: 14px; }
.site-footer .footer-legal-text p,
.site-footer .footer-legal-text a {
  color: rgba(255, 255, 255, .62);
}
.site-footer .footer-legal-text a {
  text-decoration: none;
}
.site-footer .footer-legal-text a:hover {
  color: rgba(255, 255, 255, .86);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Friend links: quieter than the legal/contact content. */
.site-footer .footer-friend-links__title { color: rgba(255, 255, 255, .66); }
.site-footer .footer-friend-links-list a { color: rgba(255, 255, 255, .54); }
.site-footer .footer-friend-links-list a:hover { color: rgba(255, 255, 255, .78); }

/* Keep the footer heading on the same baseline as the friend links. */
.site-footer .footer-friend-links { align-items: baseline; }
.site-footer .footer-friend-links__title {
  margin: 0;
  font-size: .92rem;
  line-height: 1.5;
}
