/* ============================================
   Table & Filter Styles
   ============================================ */

.filter-bar {
  background: var(--color-dark-card);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
  box-shadow: var(--shadow-md), var(--shadow-glow-gold);
  position: sticky;
  top: 80px;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.filter-controls { display: flex; flex-wrap: wrap; gap: var(--spacing-md); align-items: center; }
.filter-group { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; min-width: 200px; }
.filter-label { font-size: 0.875rem; font-weight: 600; color: var(--color-primary); }
.filter-select {
  padding: 0.625rem 1rem;
  border: 2px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 0.9375rem;
  color: var(--color-white);
  background: rgba(46, 42, 26, 0.5);
  cursor: pointer;
}
.filter-select:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(46, 42, 26, 0.8);
}
.filter-checkbox-group { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.filter-checkbox { width: 1.25rem; height: 1.25rem; accent-color: var(--color-primary); cursor: pointer; }
.filter-buttons { display: flex; gap: var(--spacing-sm); margin-top: var(--spacing-sm); }
.results-count {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--gradient-gold);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-dark);
}

.table-wrapper {
  background: var(--color-dark-card);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-glow-gold);
  overflow: hidden;
  margin-bottom: var(--spacing-xl);
  width: 100%;
  max-width: 100%;
}
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.comparison-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.comparison-table thead {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
  color: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid var(--color-primary);
}
.comparison-table th { padding: 1rem; text-align: left; font-weight: 700; white-space: nowrap; color: var(--color-primary); }
.comparison-table tbody tr {
  border-bottom: 1px solid rgba(251, 191, 36, 0.1);
  transition: all var(--transition-base);
  background: rgba(46, 42, 26, 0.3);
}
.comparison-table tbody tr:hover {
  background: rgba(251, 191, 36, 0.05);
  box-shadow: var(--shadow-md), 0 0 20px rgba(251, 191, 36, 0.1);
}
.comparison-table td { padding: 1.25rem 1rem; vertical-align: middle; color: rgba(255, 255, 255, 0.9); }

.brand-cell { display: flex; align-items: center; gap: 1rem; min-width: 220px; }
.brand-logo {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  object-fit: contain;
  background: var(--color-light);
  padding: 0.5rem;
  flex-shrink: 0;
  border: 1px solid rgba(251, 191, 36, 0.2);
}
.brand-info { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; }
.brand-info h4 { font-size: 1.25rem; font-weight: 700; color: var(--color-white); margin: 0; line-height: 1.2; }
.brand-type {
  font-size: 0.75rem;
  color: var(--color-dark);
  background: var(--gradient-gold);
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  display: inline-block;
  align-self: flex-start;
  white-space: nowrap;
}

.rating-cell { min-width: 120px; }
.rating-stars { display: flex; gap: 0.25rem; font-size: 1.25rem; color: var(--color-accent); margin-bottom: 0.25rem; }
.rating-score {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.icon-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.icon-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}
.icon-badge.active {
  background: var(--gradient-gold);
  color: var(--color-dark);
  border-color: transparent;
  font-weight: 700;
}

.payment-icons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.payment-icon {
  width: 40px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--color-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-gray);
  border: 1px solid var(--color-gray-light);
}

.actions-cell { display: flex; flex-direction: column; gap: 0.5rem; min-width: 150px; }
.sort-btn { background: none; border: none; cursor: pointer; color: var(--color-white); font-weight: 600; }
.table-cards { display: none; }

@media (max-width: 768px) {
  .filter-bar { position: static; }
  .filter-controls { flex-direction: column; }
  .filter-group { width: 100%; min-width: unset; }
  .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 0.25rem; }
  .table-cards { display: none; }
  .table-wrapper { border-radius: 1rem; padding: 0.5rem; }
  .comparison-table { border-collapse: separate; border-spacing: 0 0.5rem; }
  .comparison-table thead th { border-radius: 0.75rem 0.75rem 0 0; padding: 0.875rem 1rem; font-size: 0.8125rem; }
  .comparison-table tbody tr { border-bottom: none; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35)); }
  .comparison-table tbody tr td { background: linear-gradient(135deg, rgba(26, 36, 44, 0.9) 0%, rgba(18, 26, 34, 0.95) 100%); padding: 1rem 1.25rem; border: 1px solid rgba(251, 191, 36, 0.12); border-left: none; }
  .comparison-table tbody tr td:first-child { border-radius: 0.75rem 0 0 0.75rem; border-left: 1px solid rgba(251, 191, 36, 0.12); }
  .comparison-table tbody tr td:last-child { border-radius: 0 0.75rem 0.75rem 0; }
  .comparison-table tbody tr:hover td { background: linear-gradient(135deg, rgba(36, 48, 58, 0.95) 0%, rgba(26, 36, 46, 0.98) 100%); border-color: rgba(251, 191, 36, 0.2); }
  .brand-logo { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(251, 191, 36, 0.15); }
  .brand-type { box-shadow: 0 2px 10px rgba(251, 191, 36, 0.35); }
  .rating-score { filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.4)); }
}
@media (max-width: 420px) {
  .btn, .btn-primary, .btn-outline { font-size: 0.75rem; padding: 0.5rem 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .actions-cell .btn { font-size: 0.7rem; padding: 0.4rem 0.6rem; }
}
