/*
 * WVHM 89.7 — Component Styles
 * Buttons, chips, cards, forms, nav, logo mark, floating player.
 */

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-body);
  line-height: 1;
}
.btn:hover   { transform: translateY(-1px); text-decoration: none; }
.btn:active  { transform: translateY(0); }
.btn-primary { background: var(--accent-strong); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); }
.btn-ink    { background: var(--text); color: var(--bg); }
.btn-ink:hover { opacity: .92; }
.btn-outline { border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { background: var(--text); color: var(--bg); }
.btn-ghost  { color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm     { padding: 8px 14px; font-size: 0.85rem; }
.btn-lg     { padding: 16px 28px; font-size: 1.05rem; }

/* ── Chips / Tags ───────────────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-soft);
  letter-spacing: 0.01em;
}
.chip-accent {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--ink-900);
}
.chip-live {
  background: transparent;
  color: var(--logo-red);
  border-color: rgba(200,36,44,0.4);
  font-weight: 600;
  font-size: 0.7rem;
  padding: 3px 8px;
}
.chip-live::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--logo-red);
  animation: wvhm-pulse 1.6s ease-in-out infinite;
}
@keyframes wvhm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,36,44,0.35); }
  50%      { box-shadow: 0 0 0 6px rgba(200,36,44,0); }
}

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
  border-color: var(--border-strong);
}
.card-pad { padding: var(--s-5); }

/* ── Nav ────────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-5);
  max-width: var(--maxw);
  margin: 0 auto;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
}
.nav-brand .wordmark {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
}
.nav-brand .tagline {
  display: none;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
}
@media (min-width: 1100px) { .nav-brand .tagline { display: block; } }

.nav-links { display: none; align-items: center; gap: var(--s-2); }
@media (min-width: 900px) { .nav-links { display: flex; } }

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--text-soft);
  font-weight: 500;
  white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--surface-2); }

.nav-right { display: flex; align-items: center; gap: var(--s-2); }

.theme-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background .2s ease;
}
.theme-btn:hover { background: var(--surface-2); }
.theme-btn .sun { display: none; }
html.dark .theme-btn .moon { display: none; }
html.dark .theme-btn .sun  { display: block; }

.menu-btn {
  display: inline-flex;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  align-items: center;
  justify-content: center;
}
.menu-btn:hover { background: var(--surface-2); }
@media (min-width: 900px) { .menu-btn { display: none; } }

.menu-drawer {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--s-3) var(--s-5);
}
.menu-drawer[data-open] { display: flex; }
.menu-drawer a {
  padding: 12px 6px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.menu-drawer a:last-child { border-bottom: 0; }

/* ── Logo / Heart Mark ──────────────────────────────────────────────────────── */
.heart-mark {
  width: 52px; height: 52px;
  flex-shrink: 0;
  object-fit: contain;
  transition: filter .35s ease;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.08));
}
.heart-mark.heart-lg { width: 88px; height: 88px; }

html.dark .heart-mark,
.on-dark .heart-mark,
.footer .heart-mark {
  filter:
    drop-shadow(0 0 18px rgba(200, 36, 44, 0.55))
    drop-shadow(0 0 4px  rgba(200, 36, 44, 0.35));
}

/* ── Floating Audio Player ─────────────────────────────────────────────────── */
.floating-player {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 10px 14px 10px 10px;
  background: var(--ink-900);
  color: var(--bone-50);
  border-radius: 999px;
  box-shadow: var(--shadow-3);
  max-width: calc(100vw - 32px);
  font-size: 0.9rem;
  transition: opacity .25s ease, transform .25s ease;
}
html.dark .floating-player { background: var(--bone-50); color: var(--ink-900); }
.floating-player[hidden] { display: none !important; }

.fp-play {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent-strong);
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fp-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.fp-meta b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-meta span { font-size: 0.78rem; opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fp-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  width: 18px; height: 18px;
  margin-left: var(--s-2);
  flex-shrink: 0;
}
.fp-bars i {
  display: block;
  width: 3px;
  background: var(--accent-strong);
  border-radius: 2px;
  animation: wvhm-bar 1s ease-in-out infinite;
}
.fp-bars i:nth-child(1) { height: 30%; animation-delay: -.2s; }
.fp-bars i:nth-child(2) { height: 80%; animation-delay: -.5s; }
.fp-bars i:nth-child(3) { height: 55%; animation-delay: -.8s; }
.fp-bars i:nth-child(4) { height: 95%; }

/* Bars only animate while audio is playing */
.floating-player:not([data-playing]) .fp-bars i { animation: none; height: 30%; }

@keyframes wvhm-bar {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.35); }
}

.fp-x {
  width: 28px; height: 28px;
  border-radius: 50%;
  color: inherit;
  opacity: 0.5;
  margin-left: var(--s-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fp-x:hover { opacity: 1; }

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form { display: grid; gap: var(--s-4); max-width: 520px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
}
.field input,
.field textarea,
.field select {
  font: inherit;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, background .15s ease;
  font-size: 1rem;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent-strong);
  background: var(--bg-elev);
}
.field textarea { min-height: 120px; resize: vertical; }

/* Callout card (prayer, volunteer, etc.) */
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  align-items: center;
}
@media (max-width: 800px) { .callout { grid-template-columns: 1fr; } }
.callout h3 { font-size: 1.6rem; margin-bottom: var(--s-3); }
.callout p { color: var(--text-soft); }

/* KV stat blocks (key-value pairs) */
.kv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
}
@media (max-width: 800px) { .kv-grid { grid-template-columns: repeat(2, 1fr); } }
.kv {
  padding: var(--s-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.kv b { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 500; color: var(--accent-strong); margin-bottom: 4px; }
.kv span { font-size: 0.85rem; color: var(--text-muted); }

/* Tier cards (support page) */
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
@media (max-width: 900px) { .tier-grid { grid-template-columns: 1fr; } }
.tier-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  position: relative;
  display: flex;
  flex-direction: column;
}
.tier-card.featured { border-color: var(--accent-strong); box-shadow: var(--shadow-2); }
.tier-badge {
  position: absolute;
  top: -10px; left: 24px;
  background: var(--accent-strong);
  color: var(--accent-ink);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.tier-card h3 { font-size: 1.4rem; margin-bottom: var(--s-2); }
.tier-price { font-family: var(--font-display); font-size: 3rem; font-weight: 500; line-height: 1; margin: var(--s-2) 0 var(--s-1); }
.tier-price small { font-size: 0.9rem; font-family: var(--font-body); font-weight: 400; color: var(--text-muted); }
.tier-card ul { list-style: none; padding: 0; margin: var(--s-4) 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tier-card li { padding-left: 22px; position: relative; color: var(--text-soft); font-size: 0.94rem; }
.tier-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 12px; height: 6px;
  border-left: 2px solid var(--accent-strong);
  border-bottom: 2px solid var(--accent-strong);
  transform: rotate(-45deg);
}
.tier-card .btn { width: 100%; justify-content: center; margin-top: auto; }
