/* ==========================================================================
   Error Code Database Specific Styles
   ========================================================================== */

/* Page Header */
.page-header {
  text-align: center;
  padding: var(--space-md) 0 var(--space-lg); /* Reduced spacing for mobile */
}

.page-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.page-description {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .page-title {
    font-size: var(--font-size-4xl);
  }
}

/* ==========================================================================
   Warning Notice
   ========================================================================== */

.warning-notice {
  margin-bottom: var(--space-lg); /* Reduced from 2xl to lg */
}

.warning-card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.warning-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  cursor: pointer;
  background-color: var(--color-bg-secondary);
}

.warning-header:hover {
  background-color: var(--color-bg-tertiary);
}

.warning-icon {
  font-size: var(--font-size-xl);
  flex-shrink: 0;
}

.warning-header h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
  margin: 0;
  flex: 1;
}

.warning-toggle {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.warning-toggle:hover,
.warning-toggle:focus {
  background-color: var(--color-bg-tertiary);
}

.toggle-icon {
  transition: transform var(--transition-fast);
  font-size: var(--font-size-sm);
}

.warning-toggle[aria-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
}

.warning-details {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--color-text-secondary);
}

.warning-details[hidden] {
  display: none;
}

.warning-details p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

/* Info Grid for Search Tips and Database Contents */
.info-grid {
  display: grid;
  gap: var(--space-xl);
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .info-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.info-section h4 {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.info-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-section li {
  padding: var(--space-xs) 0;
  color: var(--color-text-secondary);
  position: relative;
  padding-left: var(--space-lg);
  line-height: var(--line-height-relaxed);
}

.info-section li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

.info-section li strong {
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
}

.warning-disclaimer {
  font-size: var(--font-size-sm);
  margin: 0;
  padding: var(--space-md);
  background-color: var(--color-bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

/* ==========================================================================
   Search Section
   ========================================================================== */

.search-section {
  margin-bottom: var(--space-lg); /* Reduced from 2xl to lg */
}

.search-container {
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.05) 0%, 
    rgba(139, 92, 246, 0.08) 50%, 
    rgba(6, 182, 212, 0.05) 100%
  );
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-radius: 24px;
  padding: var(--space-2xl);
  max-width: 1100px;
  margin: 0 auto;
  box-shadow: 
    0 8px 32px rgba(59, 130, 246, 0.1),
    0 4px 16px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.search-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, 
    transparent 30%, 
    rgba(59, 130, 246, 0.1) 50%, 
    transparent 70%
  );
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
}

.search-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
  pointer-events: none;
  animation: pulse-gradient 4s ease-in-out infinite alternate;
}

.search-form {
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 10;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}


.search-inputs {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .search-inputs {
    flex-direction: row;
    gap: var(--space-xl);
    align-items: flex-end;
    justify-content: center;
  }
  
  .input-group:first-child {
    margin-right: 0;
    min-width: 240px;
    flex: 0 0 240px;
  }
  
  .input-group:last-child {
    margin-right: 0;
    flex: 0 0 300px;
    max-width: 300px;
  }
  
  .search-container {
    padding: var(--space-2xl) var(--space-3xl);
  }
  
  .search-select {
    min-height: 64px;
    font-size: var(--font-size-lg);
    padding: var(--space-lg) var(--space-xl);
    border-radius: 20px;
  }
  
  .search-btn {
    min-width: 160px;
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--font-size-lg);
    border-radius: 20px;
    min-height: 64px;
  }
  
  .search-actions {
    margin-top: var(--space-xl);
  }
  
  .search-input {
    text-align: center;
    font-family: var(--font-family-mono);
    font-weight: 600;
    letter-spacing: 0.1em;
  }
}

.input-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.input-group:first-child {
  flex: 0 0 auto;
}

.input-group:last-child {
  flex: 1;
}

@media (max-width: 767px) {
  .input-group:first-child {
    margin-right: 0;
    margin-bottom: var(--space-sm);
  }
}

.input-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.search-input {
  padding: var(--space-lg) var(--space-xl);
  font-size: var(--font-size-xl);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 32px;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.9) 0%, 
    rgba(255, 255, 255, 0.7) 100%
  );
  backdrop-filter: blur(20px);
  color: var(--color-text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 64px;
  box-shadow: 
    0 8px 32px rgba(59, 130, 246, 0.15),
    0 4px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  outline: none;
  width: 100%;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 10;
}

.search-select {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--font-size-md);
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(248, 250, 252, 0.9) 100%
  );
  color: var(--color-text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 48px;
  box-shadow: 
    0 4px 16px rgba(59, 130, 246, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-weight: 500;
  position: relative;
  z-index: 10;
}

.search-input:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 
    0 12px 48px rgba(59, 130, 246, 0.25),
    0 8px 24px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  border-color: rgba(59, 130, 246, 0.3);
}

.search-input:focus {
  outline: none;
  transform: translateY(-3px) scale(1.02);
  border-color: var(--color-primary);
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(255, 255, 255, 0.85) 100%
  );
  box-shadow: 
    0 16px 64px rgba(59, 130, 246, 0.3),
    0 8px 32px rgba(59, 130, 246, 0.2),
    0 0 0 4px rgba(59, 130, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(59, 130, 246, 0.1);
}

.search-select:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 
    0 8px 32px rgba(59, 130, 246, 0.2),
    0 6px 24px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.search-select:focus {
  outline: none;
  transform: translateY(-3px) scale(1.03);
  border-color: var(--color-primary);
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.98) 0%, 
    rgba(248, 250, 252, 0.95) 100%
  );
  box-shadow: 
    0 12px 48px rgba(59, 130, 246, 0.25),
    0 8px 32px rgba(59, 130, 246, 0.2),
    0 0 0 4px rgba(59, 130, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.search-input::placeholder {
  color: var(--color-text-muted);
}

.input-help {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
  margin-bottom: 0;
}

/* Search Actions */
.search-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.search-btn {
  background: linear-gradient(135deg, 
    #3b82f6 0%, 
    #1d4ed8 50%, 
    #1e40af 100%
  );
  border: none;
  border-radius: 16px;
  color: white;
  cursor: pointer;
  font-size: var(--font-size-md);
  font-weight: 600;
  padding: var(--space-md) var(--space-xl);
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 120px;
  text-decoration: none;
  user-select: none;
  position: relative;
  z-index: 10;
  box-shadow: 
    0 8px 24px rgba(59, 130, 246, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.3), 
    transparent
  );
  transition: left 0.6s ease;
}

.search-btn:hover::before {
  left: 100%;
}

.search-btn:hover {
  transform: translateY(-2px) scale(1.05);
  background: linear-gradient(135deg, 
    #60a5fa 0%, 
    #3b82f6 50%, 
    #2563eb 100%
  );
  box-shadow: 
    0 12px 36px rgba(59, 130, 246, 0.4),
    0 8px 24px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: white;
  text-decoration: none;
}

.search-btn:focus {
  outline: none;
  box-shadow: 
    0 12px 36px rgba(59, 130, 246, 0.4),
    0 8px 24px rgba(59, 130, 246, 0.2),
    0 0 0 4px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.search-btn:active {
  transform: translateY(-1px) scale(1.02);
  background: linear-gradient(135deg, 
    #1d4ed8 0%, 
    #1e40af 50%, 
    #1e3a8a 100%
  );
  box-shadow: 
    0 6px 18px rgba(59, 130, 246, 0.3),
    0 4px 12px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Dark mode search styling */
[data-theme="dark"] .search-container {
  background: linear-gradient(135deg, 
    rgba(96, 165, 250, 0.1) 0%, 
    rgba(139, 92, 246, 0.15) 50%, 
    rgba(6, 182, 212, 0.1) 100%
  );
  border-color: rgba(96, 165, 250, 0.2);
  box-shadow: 
    0 8px 32px rgba(96, 165, 250, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .search-container::after {
  background: radial-gradient(circle at 30% 20%, rgba(96, 165, 250, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
}

[data-theme="dark"] .search-btn {
  background: linear-gradient(135deg, 
    #60a5fa 0%, 
    #3b82f6 50%, 
    #2563eb 100%
  );
  border: none;
  color: #ffffff;
  box-shadow: 
    0 8px 24px rgba(96, 165, 250, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .search-btn:hover {
  background: linear-gradient(135deg, 
    #93c5fd 0%, 
    #60a5fa 50%, 
    #3b82f6 100%
  );
  box-shadow: 
    0 12px 36px rgba(96, 165, 250, 0.5),
    0 8px 24px rgba(96, 165, 250, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

[data-theme="dark"] .search-btn:focus {
  box-shadow: 
    0 12px 36px rgba(96, 165, 250, 0.5),
    0 8px 24px rgba(96, 165, 250, 0.3),
    0 0 0 4px rgba(96, 165, 250, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .search-btn:active {
  background: linear-gradient(135deg, 
    #3b82f6 0%, 
    #2563eb 50%, 
    #1d4ed8 100%
  );
}

[data-theme="dark"] .search-input {
  background: linear-gradient(135deg, 
    rgba(45, 55, 72, 0.9) 0%, 
    rgba(26, 32, 44, 0.8) 100%
  );
  border-color: rgba(96, 165, 250, 0.3);
  color: var(--color-text);
  box-shadow: 
    0 8px 32px rgba(96, 165, 250, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .search-input:hover {
  transform: translateY(-2px) scale(1.01);
  background: linear-gradient(135deg, 
    rgba(51, 65, 85, 0.9) 0%, 
    rgba(30, 41, 59, 0.8) 100%
  );
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 
    0 12px 48px rgba(96, 165, 250, 0.3),
    0 8px 24px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .search-input:focus {
  transform: translateY(-3px) scale(1.02);
  border-color: var(--color-primary);
  background: linear-gradient(135deg, 
    rgba(51, 65, 85, 0.95) 0%, 
    rgba(30, 41, 59, 0.9) 100%
  );
  box-shadow: 
    0 16px 64px rgba(96, 165, 250, 0.4),
    0 8px 32px rgba(96, 165, 250, 0.3),
    0 0 0 4px rgba(96, 165, 250, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .search-select {
  background: linear-gradient(135deg, 
    rgba(45, 55, 72, 0.95) 0%, 
    rgba(26, 32, 44, 0.9) 100%
  );
  border-color: rgba(96, 165, 250, 0.3);
  color: var(--color-text);
  box-shadow: 
    0 4px 16px rgba(96, 165, 250, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .search-select:hover {
  background: linear-gradient(135deg, 
    rgba(51, 65, 85, 0.95) 0%, 
    rgba(30, 41, 59, 0.9) 100%
  );
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 
    0 8px 32px rgba(96, 165, 250, 0.2),
    0 6px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .search-select:focus {
  background: linear-gradient(135deg, 
    rgba(51, 65, 85, 0.98) 0%, 
    rgba(30, 41, 59, 0.95) 100%
  );
  border-color: var(--color-primary);
  box-shadow: 
    0 12px 48px rgba(96, 165, 250, 0.3),
    0 8px 32px rgba(96, 165, 250, 0.25),
    0 0 0 4px rgba(96, 165, 250, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Fancy Animations */
@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes pulse-gradient {
  0% { opacity: 0.5; }
  50% { opacity: 0.8; }
  100% { opacity: 0.5; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

.search-container:hover {
  animation: float 2s ease-in-out infinite;
}

.btn-icon {
  margin-right: var(--space-sm);
}

/* Search Stats */
.search-stats {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

#results-count {
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
}

/* ==========================================================================
   Loading Section
   ========================================================================== */

.loading-section {
  text-align: center;
  padding: var(--space-3xl) 0;
  margin-bottom: var(--space-2xl);
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-border);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin: 0;
}

/* ==========================================================================
   Results Section
   ========================================================================== */

.results-section {
  margin-bottom: var(--space-3xl);
  width: 100%;
  overflow: visible; /* Ensure all content is accessible */
  position: relative; /* Ensure proper stacking context */
  padding-bottom: var(--space-3xl); /* Add bottom padding for better scrolling */
}

/* Ensure page can scroll properly */
body {
  overflow-x: hidden; /* Prevent horizontal scroll */
  overflow-y: auto !important; /* Ensure vertical scroll is always available */
}

/* Table View - always visible */
.table-container {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: block;
}

.table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: none; /* Remove height restriction */
  min-height: 200px; /* Ensure minimum visibility */
}

.error-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-md);
}

.table-header {
  background-color: var(--color-bg-secondary);
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
  text-align: left;
  padding: var(--space-lg);
  border-bottom: 2px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.error-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition-fast);
}

.error-table tbody tr:hover {
  background-color: var(--color-bg-secondary);
}

.error-table tbody tr:last-child {
  border-bottom: none;
}

.error-table td {
  padding: var(--space-lg);
  color: var(--color-text-secondary);
  vertical-align: top;
}

.error-table td:first-child {
  font-weight: var(--font-weight-medium);
  color: var(--color-primary);
}

.error-table td:nth-child(2) {
  font-family: var(--font-family-mono);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  background-color: var(--color-bg-tertiary);
  text-align: center;
  width: 100px;
}

/* Enhanced dark mode table styles */
[data-theme="dark"] .error-table td {
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}

[data-theme="dark"] .error-table td:first-child {
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
}

[data-theme="dark"] .error-table td:nth-child(2) {
  color: var(--color-text);
  background-color: var(--color-bg-tertiary);
  border-radius: var(--radius-md);
}

[data-theme="dark"] .error-table td:nth-child(3) {
  color: var(--color-text-secondary);
}

/* Mobile Card View - disabled, using table instead */
.mobile-results {
  display: none !important;
}

.error-code-card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  margin-bottom: var(--space-md);
}

/* Enhanced dark mode card visibility */
[data-theme="dark"] .error-code-card {
  background-color: var(--color-bg-elevated);
  border-color: var(--color-border-secondary);
}

[data-theme="dark"] .error-code-card:hover {
  background-color: var(--color-bg-tertiary);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.error-code-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.card-model {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-code {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  background-color: var(--color-bg-tertiary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
}

.card-description {
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin: 0;
}

/* Enhanced dark mode card text */
[data-theme="dark"] .card-model {
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
}

[data-theme="dark"] .card-code {
  color: var(--color-text);
  background-color: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
}

[data-theme="dark"] .card-description {
  color: var(--color-text-secondary);
}

[data-theme="dark"] .card-header {
  border-bottom-color: var(--color-border-secondary);
}

/* ==========================================================================
   No Results Section
   ========================================================================== */

.no-results-section {
  text-align: center;
  padding: var(--space-3xl) 0;
  margin-bottom: var(--space-2xl);
}

.no-results-content {
  background-color: var(--color-bg-secondary);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-lg);
  max-width: 500px;
  margin: 0 auto;
}

.no-results-icon {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-lg);
  opacity: 0.6;
}

.no-results-content h3 {
  font-size: var(--font-size-xl);
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.no-results-content p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}


/* ==========================================================================
   Enhanced Responsiveness
   ========================================================================== */

/* Small screens */
@media (max-width: 480px) {
  .page-header {
    padding: var(--space-sm) 0 var(--space-md); /* Further reduced for small screens */
  }
  
  .page-title {
    font-size: var(--font-size-2xl);
  }
  
  .page-description {
    font-size: var(--font-size-md);
  }
  
  .search-container {
    padding: var(--space-lg);
  }
  
  .search-input {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-lg);
    min-height: 56px;
  }
  
  .search-section {
    margin-bottom: var(--space-md); /* Further reduced for small screens */
  }
  
  .warning-header {
    padding: var(--space-md);
    gap: var(--space-sm);
  }
  
  .warning-details {
    padding: 0 var(--space-md) var(--space-md);
  }
  
  .warning-notice {
    margin-bottom: var(--space-md); /* Further reduced for small screens */
  }
  
  .error-code-card {
    padding: var(--space-xs);
  }
  
  /* Ensure mobile results are fully scrollable */
  .results-section {
    max-height: none !important;
    overflow: visible !important;
  }
  
  .mobile-results {
    max-height: none !important;
    overflow: visible !important;
    min-height: auto;
    gap: var(--space-sm); /* Reduce gap between cards for more results on screen */
  }
  
  /* Make cards more compact to show more results */
  .error-code-card {
    padding: var(--space-xs) var(--space-sm);
  }
  
  .card-header {
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
  }
  
  .card-model {
    font-size: var(--font-size-xs);
  }
  
  .card-code {
    font-size: var(--font-size-md);
    padding: var(--space-xs) var(--space-sm);
  }
  
  .card-description {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
  }
  
  /* Ensure table wrapper is scrollable on small screens */
  .table-wrapper {
    max-height: 60vh; /* Reasonable height for small screens */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }
}

/* Very small screens */
@media (max-width: 320px) {
  .search-inputs {
    gap: var(--space-md);
  }
  
  .search-actions {
    gap: var(--space-sm);
  }
  
  .btn-text {
    display: none;
  }
  
  .search-btn {
    min-width: auto;
  }
}

/* ==========================================================================
   Accessibility Enhancements
   ========================================================================== */

/* Focus indicators */
.warning-toggle:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.error-code-card:focus-within {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .search-input,
  .search-select {
    border-width: 3px;
  }
  
  .error-table {
    border: 2px solid var(--color-text);
  }
  
  .error-code-card {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation: none;
  }
  
  .toggle-icon {
    transition: none;
  }
  
  .error-code-card {
    transition: none;
  }
  
  .error-code-card:hover {
    transform: none;
  }
  
}

/* ==========================================================================
   Dark Mode Adjustments
   ========================================================================== */

[data-theme="dark"] .warning-card {
  border-color: var(--color-primary);
}

[data-theme="dark"] .warning-disclaimer {
  background-color: var(--color-dark-bg-tertiary);
  border-color: var(--color-dark-border);
}

/* ==========================================================================
   Dark Mode Dropdown Fixes
   ========================================================================== */

/* Fix dropdown styling for dark theme */
[data-theme="dark"] .search-select {
  background-color: var(--color-bg-elevated);
  color: var(--color-text);
}

[data-theme="dark"] .search-select option {
  background-color: var(--color-bg-elevated);
  color: var(--color-text);
  padding: var(--space-sm);
}

[data-theme="dark"] .search-select option:hover,
[data-theme="dark"] .search-select option:focus {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

/* Ensure native dropdown is readable in dark mode */
[data-theme="dark"] select {
  background-color: var(--color-bg-elevated);
  color: var(--color-text);
  border-color: rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] select option {
  background-color: var(--color-bg-elevated);
  color: var(--color-text);
}

/* Fix any dropdowns with specific IDs */
[data-theme="dark"] #errorTypeDropdown {
  background-color: var(--color-bg-elevated);
  color: var(--color-text);
}

[data-theme="dark"] #errorTypeDropdown option {
  background-color: var(--color-bg-elevated);
  color: var(--color-text);
}