/* Component primitives — referenced by preview cards and ui_kits */

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  text-decoration: none;
}
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn-primary { background: var(--ink); color: var(--ink-on-dark); }
.btn-primary:hover { background: #1a3057; }
.btn-primary:active { background: #08182e; }
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--card-sunk); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(14, 34, 64, 0.06); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

/* --- Inputs --- */
.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field label {
  font: 500 12px/1 var(--font-sans);
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
.input, .textarea, .select {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.input::placeholder { color: var(--ink-4); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px var(--focus);
}
.input:disabled { background: var(--card-sunk); color: var(--ink-4); cursor: not-allowed; }

/* --- Badges / pills --- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  font: 600 11px/1 var(--font-sans);
  letter-spacing: 0.02em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; }
.badge-approved { background: var(--verdict-approved-soft); color: var(--verdict-approved); }
.badge-approved .dot { background: var(--verdict-approved); }
.badge-rejected { background: var(--verdict-rejected-soft); color: var(--verdict-rejected); }
.badge-rejected .dot { background: var(--verdict-rejected); }
.badge-review { background: var(--verdict-review-soft); color: var(--verdict-review); }
.badge-review .dot { background: var(--verdict-review); }
.badge-neutral { background: var(--paper-banded); color: var(--ink-2); }

/* --- Card --- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}
.card-elevated { box-shadow: var(--shadow-card); }
.card-pop { box-shadow: var(--shadow-pop); }

/* ============================================================================
 * Ficha card — the signature card of the brand.
 * No left-edge bar (rejected as not memorable). The verdict signature is a
 * tilted italic-serif stamp; the score is the hero typographic mark; a thin
 * data strip surfaces monto / comisión / latencia inline.
 * ============================================================================ */
.ficha-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 20px;
  align-items: center;
}
.ficha-card .ficha-mark {
  width: 56px; height: 40px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white;
}
.ficha-card .ficha-content { min-width: 0; }
.ficha-card .ficha-eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
  font: 500 11px/1 var(--font-mono);
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.ficha-card .ficha-eyebrow .sep { color: var(--border-strong); }
.ficha-card .ficha-eyebrow .v-label {
  font: 600 10px/1 var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ficha-card .ficha-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
}
.ficha-card .ficha-data {
  display: flex;
  align-items: stretch;
}
.ficha-card .ficha-data .cell {
  padding-right: 18px;
  margin-right: 18px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  gap: 3px;
}
.ficha-card .ficha-data .cell:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}
.ficha-card .ficha-data .k {
  font: 600 9px/1 var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ficha-card .ficha-data .v {
  font: 500 14px/1 var(--font-mono);
  color: var(--ink);
}
.ficha-card .ficha-data .v.is-free { color: var(--verdict-approved); }
.ficha-card .ficha-data .v.is-pending { color: var(--ink-3); }
.ficha-card .ficha-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  padding-left: 24px;
  border-left: 1px solid var(--border);
  min-width: 132px;
  white-space: nowrap;
}

/* Editorial verdict stamp — slightly tilted italic serif with underline.
   The brand's memorable mark. Used on cards, articles, anywhere a verdict
   needs to be signed off by the team. */
.ptb-stamp {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  transform: rotate(-3deg);
  transform-origin: right center;
}
.ptb-stamp .stamp-word {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0 2px 3px;
  border-bottom: 1.5px solid currentColor;
}
.ptb-stamp .stamp-sub {
  font: 600 9px/1 var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}
.ptb-stamp.is-approved { color: var(--verdict-approved); }
.ptb-stamp.is-rejected { color: var(--verdict-rejected); }
.ptb-stamp.is-review   { color: var(--verdict-review); }

/* Score block — large serif number with denom inline. */
.ptb-score {
  display: flex; flex-direction: column; align-items: flex-end;
}
.ptb-score .score-row { display: flex; align-items: baseline; gap: 2px; line-height: 1; }
.ptb-score .score-num {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.ptb-score .score-num.is-pending { color: var(--ink-3); font-weight: 400; }
.ptb-score .score-denom {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-3);
}
.ptb-score .score-lbl {
  font: 600 9px/1 var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 2px;
}

/* --- Tile (for payment provider / operator marks) --- */
.tile {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
}
.tile img, .tile svg { max-width: 100%; max-height: 100%; }

/* --- Links --- */
a.link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-fast) var(--ease);
}
a.link:hover { text-decoration-color: var(--ink); }

/* --- Tabs --- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); }
.tab {
  padding: 12px 16px;
  font: 600 13px/1 var(--font-sans);
  color: var(--ink-3);
  background: none; border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
}
.tab:hover { color: var(--ink-2); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }
