/**
 * assets/css/components.css
 * Purpose: Cheque preview, step cards, how-to-write, FAQ accordion, currency grid, print.
 * Button styles: buttons.css. Converter card styles: converter.css.
 * Depends on: base.css (CSS variables).
 * Last modified: 2026-04-11
 */

/* ─── Cheque preview ────────────────────────────────────────────────────────── */
.cheque-wrapper          { width: 100%; max-width: 820px; margin-inline: auto; }
.cheque-svg-container    { width: 100%; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-2); }
.cheque-svg-container svg { width: 100%; height: auto; display: block; }
.cheque-actions          { display: flex; justify-content: center; gap: var(--space-4); margin-top: var(--space-5); }

/* ─── Step cards (How to Use) ───────────────────────────────────────────────── */
.step-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(79, 140, 255, 0.15);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: var(--space-4);
}
.step-card h3 { margin-bottom: var(--space-2); font-size: 1rem; }
.step-card p  { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 0; }

/* ─── How to write content ──────────────────────────────────────────────────── */
.how-to-write-content       { max-width: 740px; }
.how-to-write-content p     { color: var(--text-dim); line-height: 1.75; }
.how-to-write-content strong { color: var(--text); }

/* ─── FAQ accordion ─────────────────────────────────────────────────────────── */
.faq-list {
  max-width: 740px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  user-select: none;
  gap: var(--space-4);
  transition: background var(--t-fast);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker                 { display: none; }
.faq-item summary:hover                   { background: rgba(255,255,255,0.03); }

.faq-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--text-faint);
  transition: transform var(--t-fast);
}
.faq-item[open] summary    { background: rgba(255,255,255,0.03); }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  padding: var(--space-4) var(--space-5) var(--space-4);
  color: var(--text-dim);
  line-height: 1.7;
  font-size: 0.95rem;
  border-top: 1px solid var(--border);
}

/* ─── Currency grid cards ───────────────────────────────────────────────────── */
.currency-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.currency-card:is(a)       { text-decoration: none; display: block; }
.currency-card:is(a):hover { border-color: var(--accent); background: var(--bg-elev-2); text-decoration: none; }
.currency-flag  { font-size: 2rem; line-height: 1; margin-bottom: var(--space-3); }
.currency-code  { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: var(--space-1); }
.currency-name  { font-size: 0.8rem; color: var(--text-faint); margin-bottom: var(--space-3); }

/* ─── Print styles ──────────────────────────────────────────────────────────── */
@media print {
  body.print-only *                     { display: none !important; }
  body.print-only .cheque-section       { display: block !important; }
  body.print-only .cheque-wrapper       { display: block !important; }
  body.print-only .cheque-svg-container { display: block !important; }
  body.print-only svg                   { display: block !important; width: 100%; }
  body.print-only .cheque-actions       { display: none !important; }
}
