/* FastFix Auto Visual Fixes - Phase 1 Accessibility & Performance Enhancements */

/*
 * This file contains additional visual improvements and fixes that complement
 * the main style.css file for better accessibility and user experience.
 */

/* Improved focus indicators for better accessibility */
button:focus,
.btn:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #ffd166 !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 1px rgba(204, 5, 17, 0.3);
}

/* Enhanced button states with better contrast */
.btn-primary:focus,
.btn-primary:hover {
  background-color: var(--cta-color);
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(204, 5, 17, 0.25);
}

/* Improved link visibility */
a:focus {
  outline: 2px solid #ffd166;
  outline-offset: 2px;
  text-decoration: underline;
}

/* Enhanced form field accessibility */
.form-control:focus {
  border-color: var(--cta-color);
  box-shadow: 0 0 0 0.2rem rgba(204, 5, 17, 0.25);
}

/* Better error state visibility */
.is-invalid {
  border-color: #dc3545;
}

.invalid-feedback {
  color: #dc3545;
  font-weight: 500;
}

/* Improved loading states */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Enhanced mobile touch targets */
@media (max-width: 768px) {
  .btn,
  .nav-link,
  .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 12px 16px;
  }

  /* Better mobile navigation */
  .navbar-toggler {
    min-width: 44px;
    min-height: 44px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --background: #000000;
  }

  .btn-primary {
    border: 3px solid #ffffff !important;
  }
}

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

/* Print styles */
@media print {
  .btn,
  .navbar,
  .footer {
    display: none !important;
  }

  body {
    color: #000000 !important;
    background: #ffffff !important;
  }

  a[href^="http"]:after {
    content: " (" attr(href) ")";
  }
}

/* Skip link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--cta-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  z-index: 1000;
  font-weight: 600;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.skip-link:focus {
  transform: translateY(0);
  color: white;
  text-decoration: none;
}

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

/* Enhanced error messages */
.alert {
  border-radius: 8px;
  border: 2px solid;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  border-color: #dc3545;
  color: #721c24;
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.1);
  border-color: #28a745;
  color: #155724;
}

/* Better visual hierarchy */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  margin-bottom: 0.75em;
}

/* Improved table accessibility */
table {
  border-collapse: collapse;
}

th, td {
  border: 1px solid var(--border);
  padding: 12px;
  text-align: left;
}

th {
  background-color: var(--surface-raised);
  font-weight: 600;
}

/* Better spacing for readability */
p {
  margin-bottom: 1.2em;
  line-height: 1.6;
}

/* Enhanced card hover states */
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

/* Improved input validation feedback */
.form-control.is-valid {
  border-color: #28a745;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.8-.8-.8-.8 1.2-1.2.8.8L6.7 2.3l.8.8-2.8 2.8-.8-.8-.8.8z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Better visual feedback for interactive elements */
.clickable {
  cursor: pointer;
  transition: all 0.2s ease;
}

.clickable:hover {
  transform: scale(1.02);
}

/* Enhanced notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 300px;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}