/* ═══════════════════════════════════════════════════════════════════
   Components — Buttons, Inputs, Tags, Badges, Pagination
   ═══════════════════════════════════════════════════════════════════ */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.88em;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: var(--surface-4);
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: scale(0.96) translateY(0);
  box-shadow: none;
  filter: brightness(0.9);
  transition: all 60ms var(--ease-out);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  filter: none;
  box-shadow: none;
}

/* Primary / Accent */
.btn-accent {
  background: var(--brand);
  color: #0B0D14;
  border-color: var(--brand);
  font-weight: 600;
}

.btn-accent:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  box-shadow: var(--brand-glow);
  transform: translateY(-1px);
}

.btn-accent:active {
  background: var(--brand-pressed);
  border-color: var(--brand-pressed);
  transform: scale(0.96) translateY(0);
  box-shadow: 0 0 8px rgba(75, 200, 192, 0.15);
  filter: brightness(0.85);
  transition: all 60ms var(--ease-out);
}

/* Flat / Ghost */
.btn-flat {
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
}

.btn-flat:hover {
  background: var(--surface-3);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: none;
}

.btn-flat:active {
  transform: scale(0.96) translateY(0);
  filter: brightness(0.85);
  transition: all 60ms var(--ease-out);
}

/* Small */
.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 0.82em;
}

/* ── Inputs ── */
.input-sm {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--surface-4);
  color: var(--text-primary);
  font-size: 0.85em;
  outline: none;
  transition: all var(--duration-fast) var(--ease-out);
  box-sizing: border-box;
  vertical-align: middle;
}

.input-sm::placeholder { color: var(--text-disabled); }

.input-sm:hover { border-color: var(--border-strong); }

.input-sm:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(75, 200, 192, 0.12);
}

select.input-sm {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

/* Hide number input spinners */
input[type=number].input-sm::-webkit-inner-spin-button,
input[type=number].input-sm::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number].input-sm { -moz-appearance: textfield; }

/* ── Tags / Badges ── */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tag-green  { background: var(--success-bg); color: var(--success); }
.tag-yellow { background: var(--warning-bg); color: var(--warning); }
.tag-gray   { background: var(--surface-3);  color: var(--text-tertiary); }

/* ── Profit Colors ── */
.profit-positive { color: var(--success); font-weight: 600; }
.profit-negative { color: var(--danger);  font-weight: 600; }

/* ── Lowest Price Highlight ── */
.price-lowest {
  color: var(--success);
  font-weight: 700;
}

/* ── Pagination Buttons ── */
.arb-page-btn {
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--text-secondary);
  font-size: 0.82em;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  user-select: none;
}

.arb-page-btn:hover:not(:disabled) {
  background: var(--surface-4);
  border-color: var(--border-strong);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.arb-page-btn:active:not(:disabled) {
  transform: scale(0.92);
  filter: brightness(0.9);
  transition: all 60ms var(--ease-out);
}

.arb-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Platform Checkboxes ── */
.settings-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85em;
  user-select: none;
  transition: all var(--duration-fast) var(--ease-out);
  background: var(--surface-3);
}

.settings-check:hover {
  background: var(--surface-4);
  border-color: var(--border-strong);
}

.settings-check:has(input:checked) {
  border-color: var(--brand);
  background: rgba(75, 200, 192, 0.06);
}

.settings-check input[type=checkbox] {
  cursor: pointer;
  accent-color: var(--brand);
}
