/* ==========================================================================
   Reusable UI Components
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
}

.btn-primary {
  background: var(--color-brand);
  color: #fff;
  border-color: var(--color-brand);
  box-shadow: 0 2px 8px rgba(18, 50, 77, 0.22);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-brand-hover);
  border-color: var(--color-brand-hover);
  color: #fff;
  box-shadow: 0 4px 14px rgba(18, 50, 77, 0.3);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(18, 50, 77, 0.2);
}

.btn-secondary {
  background: #fff;
  color: #1E293B;
  border-color: #CBD5E1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover:not(:disabled) {
  background: #F8FAFC;
  border-color: #94A3B8;
  color: var(--color-text-main);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

.btn-secondary:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-lg {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
}

.btn-sm {
  height: 32px;
  padding: 0 13px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-brand {
  background: #F0F5FA;
  color: #12324D;
  border: 1px solid #D5E3EE;
  font-weight: 700;
}

.badge-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(26, 122, 74, 0.2);
}

.badge-cart-count {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--color-brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Inputs & Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #3D4650;
}

.input-text, .select-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #D6DBE1;
  background: #fff;
  outline: none;
  font-size: 13.5px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-text:focus, .select-input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(18, 50, 77, 0.12);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: #3D4650;
  cursor: pointer;
}

.checkbox-input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-brand);
  cursor: pointer;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #14181D;
  color: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: var(--shadow-xl);
  animation: toastIn 180ms ease forwards;
  pointer-events: auto;
  font-size: 13.5px;
  font-weight: 500;
}

.toast-icon {
  width: 16px;
  height: 16px;
  stroke: #7FD1A6;
  flex-shrink: 0;
}

/* Quantity Stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #D6DBE1;
  border-radius: 8px;
  overflow: hidden;
  height: 32px;
  background: #fff;
}

.stepper-btn {
  width: 24px;
  height: 100%;
  border: none;
  background: #fff;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.stepper-btn:hover {
  background: #F0F2F5;
}

.stepper-input {
  width: 36px;
  height: 100%;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-main);
}
