/* ===================================
   ACCESSIBILITY IMPROVEMENTS
   =================================== */

/* Focus States */
*:focus {
  outline: 2px solid #E30A1D;
  outline-offset: 2px;
}

/* Skip to Content Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #E30A1D;
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 10001;
  border-radius: 0 0 4px 0;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
  outline: none;
}

/* Better Focus Visibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #E30A1D;
  outline-offset: 2px;
}

/* Focus within */
.search-container:focus-within,
.hero-search-container:focus-within {
  box-shadow: 0 0 0 3px rgba(227, 10, 29, 0.2);
}

/* Keyboard Navigation Helpers */
.btn-details:focus,
.btn-add-to-inquiry:focus {
  outline: 2px solid #E30A1D;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(227, 10, 29, 0.2);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  * {
    border-width: 2px !important;
  }
  
  .btn-details,
  .button {
    border: 2px solid currentColor !important;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Link Focus Styles */
a:focus {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Table Accessibility */
table th {
  font-weight: 600;
}

table caption {
  padding: 10px;
  font-weight: 600;
  text-align: left;
}

/* Form Labels */
label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  cursor: pointer;
}

/* Required Field Indicator */
label .required,
label[required]::after {
  color: #dc3545;
  content: ' *';
  font-weight: 700;
}

/* Error Messages */
.error-message {
  color: #dc3545;
  font-size: 14px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.error-message::before {
  content: '⚠';
  font-size: 16px;
}

/* Success Messages */
.success-message {
  color: #28a745;
  font-size: 14px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.success-message::before {
  content: '✓';
  font-size: 16px;
  font-weight: 700;
}

/* Loading States */
[aria-busy="true"] {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

[aria-busy="true"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #E30A1D;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

/* Disabled States */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

button:disabled:hover,
input:disabled:hover,
select:disabled:hover,
textarea:disabled:hover {
  transform: none !important;
}

/* Better Color Contrast */
.condition-indicator {
  border: 2px solid white;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Support (Future) */
@media (prefers-color-scheme: dark) {
  /* Can be implemented later */
}

