/* ============================================================
   VibeSecurity - UI Components
   ============================================================ */

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 500;
  transition:
    background var(--dur-fast),
    border-color var(--dur-fast),
    transform var(--dur-fast),
    box-shadow var(--dur-base);
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  height: 42px;
  padding: 0 22px;
  border-radius: var(--radius-md);
  background: var(--p);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset;
}
.btn-primary:hover {
  background: var(--p-light);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, var(--shadow-purple);
}

.btn-secondary {
  height: 42px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}
.btn-secondary:hover {
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.04);
}

.btn-ghost {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--ink-2);
  font-size: 13px;
}
.btn-ghost:hover {
  color: var(--ink);
  background: rgba(255,255,255,.05);
}

.btn-sm { height: 32px; padding: 0 14px; font-size: 12px; border-radius: 7px; }
.btn-lg { height: 48px; padding: 0 28px; font-size: 15px; border-radius: 12px; }

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.badge-crit   { background: var(--sev-crit-bg);  color: var(--sev-crit-text);  border: 1px solid var(--sev-crit-border);  }
.badge-high   { background: var(--sev-high-bg);  color: var(--sev-high-text);  border: 1px solid var(--sev-high-border);  }
.badge-med    { background: var(--sev-med-bg);   color: var(--sev-med-text);   border: 1px solid var(--sev-med-border);   }
.badge-purple { background: var(--p-fog);         color: var(--p-light);         border: 1px solid rgba(124,93,249,.25);    }
.badge-neutral{ background: var(--void-2);         color: var(--ink-2);           border: 1px solid var(--border);           }
.badge-green  { background: rgba(45,212,170,.1);  color: var(--green);           border: 1px solid rgba(45,212,170,.2);     }

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ── CARDS ── */
.card {
  background: var(--void-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  transition: background var(--dur-base);
}
.card:hover { background: var(--void-2); }

.card-featured {
  background: var(--void-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: inset 0 1px 0 rgba(124,93,249,.4);
}

.card-glow {
  background: var(--void-1);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

/* ── INPUTS ── */
.input {
  height: 42px;
  padding: 0 16px;
  background: var(--void-1);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  width: 100%;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.input:focus {
  border-color: var(--p);
  box-shadow: 0 0 0 3px rgba(124,93,249,.15);
}
.input::placeholder { color: var(--ink-3); }

.input-mono {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--void);
}

/* ── SEVERITY SCALE ── */
.sev-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--void-1);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.sev-bar {
  width: 3px;
  height: 20px;
  border-radius: 2px;
  flex-shrink: 0;
}
.sev-label { font-size: 12px; font-weight: 600; min-width: 52px; }
.sev-desc  { font-size: 12px; color: var(--ink-3); flex: 1; line-height: 1.4; }
.sev-count { font-size: 12px; font-weight: 500; font-family: var(--font-mono); }

/* ── CODE BLOCK ── */
.code-block {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--ink-3);
  white-space: pre;
  overflow-x: auto;
}
.code-ok   { color: var(--green); }
.code-err  { color: var(--red);   }
.code-warn { color: var(--amber); }
.code-hi   { color: var(--p-light); }

/* ── TERMINAL CURSOR ── */
.cursor {
  display: inline-block;
  width: 7px;
  height: 12px;
  background: var(--p);
  animation: blink 0.9s step-end infinite;
  vertical-align: text-bottom;
}

/* ── SCORE RING (SVG-based) ── */
.score-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.score-wrap svg { transform: rotate(-90deg); }
.score-inner {
  position: absolute;
  text-align: center;
  line-height: 1;
}
.score-num { font-size: 24px; font-weight: 300; color: var(--ink); }
.score-sub { font-size: 9px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }

/* ── DIVIDER ── */
.divider         { height: 1px; background: var(--border); }
.divider-section { height: 1px; background: var(--border); margin: 64px 0; }

/* ── PLAN FEATURES LIST ── */
.plan-feats { display: flex; flex-direction: column; gap: 9px; }
.pf {
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.4;
}
.pf.y { color: var(--ink-2); }
.pf.y::before { content: '✓'; color: var(--green); flex-shrink: 0; }
.pf.n { color: var(--ink-3); }
.pf.n::before { content: '-'; color: var(--ink-3); flex-shrink: 0; }

/* ── STATUS DOT ── */
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: statusPulse 2s ease-in-out infinite;
}
