/* ============================================================
   PERSIVA METHOD BRAND GUIDE — COMPONENTS.CSS
   All reusable UI components used throughout the guide
   ============================================================ */

/* ── COLOR SWATCHES ─────────────────────────────────────────── */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: var(--space-md);
}

.swatch-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.swatch {
  position: relative;
  cursor: pointer;
}

.swatch-color {
  height: 56px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform var(--transition-fast);
  border-bottom: none;
}

.swatch:hover .swatch-color {
  transform: translateY(-2px);
}

.swatch-info {
  padding: 6px 8px;
  background: var(--ink-800);
  border: 1px solid var(--ink-600);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.swatch-step {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--ink-400);
  margin-bottom: 2px;
  display: block;
}

.swatch-hex {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--parchment-100);
  display: block;
}

/* Hex tooltip on hover */
.swatch-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--emerald-600);
  color: var(--parchment-50);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  z-index: 10;
}

.swatch-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--emerald-600);
}

.swatch:hover .swatch-tooltip {
  opacity: 1;
}

/* ── COLOR USAGE CARD ───────────────────────────────────────── */
.color-usage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: var(--space-md);
}

.color-usage-item {
  background: var(--ink-800);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  border: 1px solid var(--ink-600);
}

.color-usage-role {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald-200);
  margin-bottom: 4px;
  display: block;
}

.color-usage-desc {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--slate-300);
  line-height: 1.5;
}

/* ── SEMANTIC COLORS ────────────────────────────────────────── */
.semantic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.semantic-swatch {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.semantic-color {
  height: 40px;
}

.semantic-info {
  padding: 6px 8px;
  background: var(--ink-800);
  border: 1px solid var(--ink-600);
  border-top: none;
}

.semantic-role {
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-300);
  margin-bottom: 2px;
  display: block;
}

.semantic-hex {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--parchment-100);
}

/* ── TYPOGRAPHY SPECIMEN ────────────────────────────────────── */
.type-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-xl);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--ink-600);
}

.type-row:last-child { border-bottom: none; }

.type-spec {
  width: 180px;
  flex-shrink: 0;
}

.type-spec-role {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--emerald-200);
  margin-bottom: 4px;
  display: block;
}

.type-spec-detail {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-400);
  line-height: 1.6;
}

.type-sample { flex: 1; }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  font-family: var(--font-sans);
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

/* Primary */
.btn-primary {
  background: var(--emerald-600);
  color: var(--parchment-50);
  border-color: var(--emerald-600);
}

.btn-primary:hover {
  background: var(--emerald-400);
  border-color: var(--emerald-400);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(13,122,82,0.3);
}

.btn-primary:active {
  background: var(--emerald-800);
  border-color: var(--emerald-800);
  transform: translateY(0);
  box-shadow: none;
}

/* Secondary on light */
.btn-secondary {
  background: transparent;
  color: var(--ink-900);
  border-color: var(--ink-900);
}

.btn-secondary:hover {
  background: var(--parchment-100);
  transform: translateY(-1px);
}

/* Secondary on dark */
.btn-secondary-dark {
  background: transparent;
  color: var(--parchment-100);
  border-color: var(--ink-600);
}

.btn-secondary-dark:hover {
  background: var(--ink-800);
  border-color: var(--ink-400);
  transform: translateY(-1px);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--emerald-600);
  border-color: var(--emerald-600);
}

.btn-ghost:hover {
  background: var(--emerald-50);
  transform: translateY(-1px);
}

/* Sizes */
.btn-lg { font-size: 14px; padding: 13px 26px; }
.btn-md { font-size: 13px; padding: 10px 20px; }
.btn-sm { font-size: 12px; padding: 8px 15px; }

/* Button row */
.btn-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.btn-row-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-600);
  width: 80px;
  flex-shrink: 0;
}

/* ── FORM FIELDS ────────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--slate-600);
  margin-bottom: 6px;
  display: block;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--parchment-100);
  border: 1px solid var(--parchment-400);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-900);
  transition: border-color var(--transition-fast);
  outline: none;
}

.form-input::placeholder { color: var(--parchment-600); }

.form-input:focus {
  border-color: var(--emerald-600);
  border-width: 1.5px;
}

.form-input.error {
  border-color: var(--error);
  border-width: 1.5px;
}

.form-input:disabled {
  background: var(--parchment-200);
  opacity: 0.6;
  cursor: not-allowed;
}

.form-hint {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--parchment-600);
  margin-top: 4px;
}

.form-error-msg {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--error);
  margin-top: 4px;
}

/* Input state row */
.input-state-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.input-state-label {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-600);
  width: 72px;
  flex-shrink: 0;
}

.input-demo {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  width: 220px;
  outline: none;
}

.input-demo-default {
  background: var(--parchment-100);
  border: 1px solid var(--parchment-400);
  color: var(--parchment-600);
}

.input-demo-focus {
  background: var(--parchment-100);
  border: 1.5px solid var(--emerald-600);
  color: var(--ink-900);
}

.input-demo-error {
  background: var(--parchment-100);
  border: 1.5px solid var(--error);
  color: var(--ink-900);
}

.input-demo-disabled {
  background: var(--parchment-200);
  border: 1px solid var(--parchment-400);
  color: var(--parchment-600);
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── CONTENT CARDS ──────────────────────────────────────────── */
.guide-card {
  background: var(--parchment-50);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--parchment-200);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.guide-card-dark {
  background: var(--ink-800);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--ink-600);
  transition: transform var(--transition-fast);
}

.guide-card-dark:hover {
  transform: translateY(-2px);
}

.card-accent-bar {
  height: 3px;
  background: var(--emerald-600);
}

.card-body {
  padding: var(--space-md);
}

.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--emerald-600);
  margin-bottom: 6px;
  display: block;
}

.card-eyebrow-dark {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--emerald-200);
  margin-bottom: 6px;
  display: block;
}

.card-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink-900);
  line-height: 1.2;
  margin-bottom: 6px;
}

.card-title-dark {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 16px;
  color: var(--parchment-100);
  line-height: 1.2;
  margin-bottom: 6px;
}

.card-text {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--slate-600);
  line-height: 1.65;
  margin-bottom: var(--space-sm);
}

.card-text-dark {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--slate-300);
  line-height: 1.65;
  margin-bottom: var(--space-sm);
}

.card-link {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--emerald-600);
  transition: color var(--transition-fast);
}

.card-link:hover { color: var(--emerald-400); }

.card-link-dark {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--emerald-200);
}

/* ── TESTIMONIAL ────────────────────────────────────────────── */
.testimonial-card {
  background: var(--parchment-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--parchment-200);
  border-top: 3px solid var(--emerald-600);
  padding: var(--space-lg);
}

.testimonial-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: 16px;
  color: var(--ink-900);
  line-height: 1.55;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--parchment-200);
}

.testimonial-name {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-900);
  margin-bottom: 2px;
}

.testimonial-title {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--parchment-600);
}

/* ── TIER PILLS ─────────────────────────────────────────────── */
.tier-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--emerald-600);
  color: var(--emerald-600);
  background: var(--emerald-50);
  display: inline-block;
}

/* ── SPACING SCALE VISUAL ───────────────────────────────────── */
.space-scale {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}

.space-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.space-vis {
  background: var(--emerald-600);
  border-radius: 2px;
  width: 100%;
}

.space-val {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--slate-300);
}

.space-name {
  font-family: var(--font-sans);
  font-size: 9px;
  color: var(--ink-400);
  text-align: center;
}

/* ── RADIUS DEMO ────────────────────────────────────────────── */
.radius-row {
  display: flex;
  gap: var(--space-md);
  align-items: flex-end;
}

.radius-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.radius-demo {
  width: 56px;
  height: 56px;
  background: var(--ink-700);
  border: 1px solid var(--ink-600);
}

.radius-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--slate-300);
  text-align: center;
}

.radius-use {
  font-family: var(--font-sans);
  font-size: 10px;
  color: var(--ink-400);
  text-align: center;
  line-height: 1.4;
}

/* ── RULE SPECIMENS ─────────────────────────────────────────── */
.rule-specimen {
  margin-bottom: var(--space-md);
}

.rule-specimen-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--slate-600);
  margin-bottom: 6px;
  display: block;
}

/* ── DOCUMENT PREVIEW ───────────────────────────────────────── */
.doc-preview {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--ink-600);
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.doc-cover-preview {
  background: var(--ink-900);
  padding: 28px 24px 0;
  display: flex;
  flex-direction: column;
}

.doc-cover-top {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px 24px;
  text-align: center;
}

.doc-cover-rule {
  width: 32px;
  height: 2px;
  background: var(--emerald-600);
  margin: 12px auto;
}

.doc-cover-footer {
  background: #0A1219;
  padding: 10px 20px;
  border-top: 2px solid var(--emerald-600);
  display: flex;
  justify-content: space-between;
}

.doc-footer-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.doc-footer-lbl {
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-400);
}

.doc-footer-val {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--slate-300);
}

.doc-interior-preview {
  background: var(--parchment-50);
  display: flex;
  flex-direction: column;
}

.doc-int-header {
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid var(--emerald-600);
}

.doc-int-header-title {
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--emerald-600);
}

.doc-int-header-tier {
  font-family: var(--font-mono);
  font-size: 7px;
  color: var(--parchment-600);
}

.doc-int-body {
  flex: 1;
  padding: 14px 16px;
}

.doc-int-footer {
  padding: 7px 16px;
  border-top: 1px solid var(--parchment-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--parchment-50);
}

.doc-int-footer-wordmark {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 9px;
  color: var(--ink-900);
}

.doc-int-footer-title {
  font-family: var(--font-mono);
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--parchment-600);
}

.doc-int-footer-page {
  font-family: var(--font-mono);
  font-size: 7px;
  color: var(--parchment-600);
}

/* ── LOGO DISPLAY ───────────────────────────────────────────── */
.logo-treatment {
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  min-height: 140px;
}

.logo-treatment img,
.logo-treatment svg {
  max-height: 48px;
  width: auto;
}

.logo-treatment-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-align: center;
}

/* ── PROHIBITED ITEM ────────────────────────────────────────── */
.prohibited-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--ink-600);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--slate-300);
  line-height: 1.55;
}

.prohibited-item:last-child { border-bottom: none; }

.prohibited-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--error);
  flex-shrink: 0;
  margin-top: 6px;
}

.approved-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald-600);
  flex-shrink: 0;
  margin-top: 6px;
}
