/**
 * BRAKEMATIC, LDA — Reusable UI Components
 */

/* ==========================================================================
   Badges & Tags
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-xs);
  line-height: 1.4;
  white-space: nowrap;
}

.badge-blue {
  background-color: var(--brand-blue-light);
  color: var(--brand-blue);
  border: 1px solid rgba(0, 48, 109, 0.15);
}

.badge-yellow {
  background-color: var(--brand-yellow-subtle);
  color: #7A5300;
  border: 1px solid rgba(245, 173, 0, 0.3);
}

.badge-muted {
  background-color: var(--surface-muted);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-demo {
  background-color: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
  font-weight: 700;
}

/* ==========================================================================
   Alerts & Banners
   ========================================================================== */

.alert {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface);
  margin-bottom: var(--space-6);
  line-height: var(--leading-normal);
  font-size: var(--text-sm);
}

.alert-info {
  background-color: var(--brand-blue-light);
  border-color: rgba(0, 48, 109, 0.2);
  color: var(--brand-blue);
}

.alert-demo {
  background-color: #FFFBEB;
  border-left: 4px solid var(--brand-yellow);
  border-color: #FDE68A #FDE68A #FDE68A var(--brand-yellow);
  color: #78350F;
}

.alert-demo strong {
  color: #451A03;
}

.alert-demo a {
  color: var(--brand-blue);
  font-weight: 600;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.breadcrumb-item:not(:last-child)::after {
  content: "/";
  color: var(--border);
  font-weight: 400;
}

.breadcrumb-link {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb-link:hover {
  color: var(--brand-blue);
  text-decoration: underline;
}

.breadcrumb-current {
  color: var(--brand-blue);
  font-weight: 600;
}

/* ==========================================================================
   Cards (Used purposefully for Products, Categories, Fleet solutions)
   ========================================================================== */

.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-sm);
}

/* Category Entry Card */
.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  text-decoration: none;
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.category-card:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.category-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.category-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background-color: var(--surface-muted);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-blue);
  font-weight: 700;
}

.category-card-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--brand-blue);
  margin-bottom: var(--space-2);
}

.category-card-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-4);
  flex-grow: 1;
}

.category-card-action {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--brand-blue);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.category-card:hover .category-card-action {
  color: var(--brand-yellow-hover);
}

/* ==========================================================================
   Brand Applications Grid
   ========================================================================== */

.brand-pills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background-color: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--brand-blue);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.brand-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--brand-yellow);
}

/* ==========================================================================
   Technical Specifications Table
   ========================================================================== */

.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin-top: var(--space-4);
  margin-bottom: var(--space-6);
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.specs-table th,
.specs-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.specs-table tr:last-child td {
  border-bottom: none;
}

.specs-table th {
  background-color: var(--surface-muted);
  color: var(--brand-blue);
  font-weight: 600;
  width: 40%;
}

.specs-table td {
  color: var(--text);
  font-weight: 500;
}

/* ==========================================================================
   Quantity Selector
   ========================================================================== */

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: var(--surface);
}

.qty-btn {
  width: 38px;
  height: 38px;
  background-color: var(--surface-muted);
  border: none;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--brand-blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast);
}

.qty-btn:hover {
  background-color: var(--border);
}

.qty-input {
  width: 50px;
  height: 38px;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--brand-blue);
  -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ==========================================================================
   Empty States
   ========================================================================== */

.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  background-color: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-4);
  color: var(--text-muted);
}

.empty-state-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--brand-blue);
  margin-bottom: var(--space-2);
}

.empty-state-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-6);
}
