/* ═══════════════════════════════════════
   BUTTONS — Premium Button System
   ═══════════════════════════════════════ */

/* ─── Base Button ───────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  border: 1px solid transparent;
  line-height: 1;
}

.button svg {
  width: 17px;
  height: 17px;
}

/* ─── Primary ───────────────────────── */
.button-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.button-primary:hover {
  background: #1D4ED8;
  border-color: #1D4ED8;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.32);
  transform: translateY(-1px);
}

.button-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

/* ─── Secondary ─────────────────────── */
.button-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.button-secondary:hover {
  background: var(--bg-alt);
  border-color: #C7D0E0;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ─── Outline ───────────────────────── */
.button-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}

.button-outline:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
}

/* ─── Ghost ─────────────────────────── */
.button-ghost {
  background: transparent;
  color: var(--ink-light);
  border-color: transparent;
}

.button-ghost:hover {
  background: var(--bg-alt);
  color: var(--ink);
}

/* ─── Ghost Light (on dark bg) ──────── */
.button-ghost-light {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.button-ghost-light:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

/* ─── White (on dark bg) ────────────── */
.button-white {
  background: #fff;
  color: var(--brand);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.button-white:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

/* ─── Danger ────────────────────────── */
.button-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.button-danger:hover {
  background: #DC2626;
  border-color: #DC2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* ─── Success ───────────────────────── */
.button-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.button-success:hover {
  background: #059669;
  border-color: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* ─── Large ─────────────────────────── */
.button-lg {
  min-height: 50px;
  padding: 0 26px;
  font-size: 14px;
  border-radius: var(--radius-md);
}

.button-lg svg {
  width: 20px;
  height: 20px;
}

/* ─── Small ─────────────────────────── */
.button-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 11px;
  border-radius: 8px;
}

.button-sm svg {
  width: 14px;
  height: 14px;
}

/* ─── Icon Only ─────────────────────── */
.button-icon {
  width: 42px;
  padding: 0;
}

.button-icon.button-lg {
  width: 50px;
}

.button-icon.button-sm {
  width: 34px;
}

/* ─── Text Button ───────────────────── */
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 2px;
  transition: color var(--duration-fast) var(--ease-out);
}

.text-button:hover,
.text-link:hover {
  color: var(--brand);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out), gap var(--duration-fast) var(--ease-out);
}

.text-link:hover {
  gap: 6px;
}

/* ─── Button Group ──────────────────── */
.button-group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* ─── Responsive ────────────────────── */
@media (max-width: 640px) {
  .button-lg {
    min-height: 44px;
    padding: 0 20px;
    font-size: 13px;
  }

  .button-group {
    gap: 8px;
  }
}