/* Basic Active Admin CSS - SCSS compilation disabled */
/* Add custom Active Admin styles here */
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* SkrBrd Sport-Specific Styles - Custom components not available in Tailwind */

/* Throw details page */
.attempt-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 20px;
}

.attempt-score {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border-radius: 10px;
  margin-bottom: 20px;
}


/* Sport-specific components - these have complex logic that can't be replicated with Tailwind utilities */

/* Target ring styles to ensure visibility - 48" x 48" at 1" = 10px scale */
.iatf-target-clickable {
  position: relative;
  width: 480px; /* 48" × 10px/inch */
  height: 480px; /* 48" × 10px/inch */
  margin: 0 auto;
  user-select: none;
}

.target-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

/* Override border-radius for rectangular elements */
.target-ring.clutch-box,
.target-ring.clutch-box-mag {
  border-radius: 0 !important;
}

.target-ring.miss-area {
  width: 480px; /* 48" */
  height: 480px; /* 48" */
  background-color: transparent;
  border: 2px dashed #d1d5db;
}

.target-ring.outer-ring {
  width: 270px; /* 27" */
  height: 270px; /* 27" */
  background-color: transparent;
  border: 8.75px solid #2563eb; /* 7/8" = 0.875" = 8.75px */
  font-weight: bold;
  color: #2563eb;
  font-size: 1rem;
}

.target-ring.middle-ring {
  width: 170px; /* 17" */
  height: 170px; /* 17" */
  background-color: transparent;
  border: 8.75px solid #dc2626; /* 7/8" = 0.875" = 8.75px, red */
  font-weight: bold;
  color: #dc2626;
  font-size: 1rem;
}

.target-ring.bullseye {
  width: 70px; /* 7" */
  height: 70px; /* 7" */
  background-color: transparent;
  border: 8.75px solid #000000; /* 7/8" = 0.875" = 8.75px, black */
  font-weight: bold;
  color: #000000;
  font-size: 1.5rem;
  z-index: 10;
}

.target-ring:hover {
  filter: brightness(1.1);
}

.target-ring:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.5);
}

.target-ring.clutch:focus,
.target-ring.clutch-box:focus {
  outline: 3px solid #007bff;
  outline-offset: 2px;
}

.target-ring.clutch {
  width: 24px; /* 2" scaled slightly larger for accessibility */
  height: 24px; /* 2" scaled slightly larger for accessibility */
  background-color: #22c55e;
  border: 3px solid #16a34a;
  border-radius: 50%;
  font-weight: bold;
  color: white;
  font-size: 0.7rem;
  z-index: 15;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  /* Improve keyboard focus target */
  min-width: 24px;
  min-height: 24px;
  /* Allow transform for positioning */
}

.target-ring.clutch-box {
  width: 12px; /* 1" scaled slightly larger for accessibility */
  height: 18px; /* 1.5" scaled slightly larger for accessibility */
  background-color: white;
  border: 1px solid #000000; /* black penline */
  border-radius: 0; /* Remove border-radius to make it rectangular */
  font-weight: bold;
  color: black;
  font-size: 0.6rem;
  z-index: 20;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  /* Improve keyboard focus target */
  min-width: 12px;
  min-height: 18px;
  /* Allow transform for centering */
}

/* Magnified clutch view styles (1" = 100px) */
.clutch-magnified {
  position: relative;
  width: 400px; /* 4" at 100px/inch for spacing */
  height: 200px; /* 2" at 100px/inch */
  margin: 0 auto 20px auto;
  user-select: none;
}

.target-ring.clutch-mag {
  width: 200px; /* 2" at 100px/inch */
  height: 200px; /* 2" at 100px/inch */
  background-color: #22c55e;
  border: 6px solid #16a34a;
  border-radius: 50%;
  font-weight: bold;
  color: white;
  font-size: 1.5rem;
  z-index: 15;
  position: absolute;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.target-ring.clutch-box-mag {
  width: 100px; /* 1" at 100px/inch */
  height: 150px; /* 1.5" at 100px/inch */
  background-color: white;
  border: 2px solid #000000;
  border-radius: 0; /* Remove border-radius to make it rectangular */
  font-weight: bold;
  color: black;
  font-size: 1.2rem;
  z-index: 20;
  position: absolute;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  /* Allow transform for centering */
}

/* WATL Target styles - 4' x 4' board with wood grain background */
.watl-target-clickable {
  position: relative;
  width: 384px; /* 48" × 8px/inch (4' board) */
  height: 384px; /* 48" × 8px/inch (4' board) */
  margin: 0 auto;
  user-select: none;
  background: 
    repeating-linear-gradient(90deg,
      #e8e6e1 0px,
      #e8e6e1 8px,
      #d8d6d1 8px,
      #d8d6d1 9px,
      #e8e6e1 9px,
      #e8e6e1 16px,
      #d2d0cb 16px,
      #d2d0cb 17px
    );
  border: 2px solid #999;
  border-radius: 8px;
}

.target-ring.watl-miss-area {
  width: 384px !important; /* Match board size */
  height: 384px !important;
  background-color: transparent;
  border: none;
}

.target-ring.watl-ring-1 {
  width: 288px !important; /* 36" diameter × 8px/inch */
  height: 288px !important;
  background-color: transparent;
  border: 4px solid #000000;
  border-radius: 50%;
}

.target-ring.watl-ring-2 {
  width: 224px !important; /* 28" diameter × 8px/inch */
  height: 224px !important;
  background-color: transparent;
  border: 4px solid #000000;
  border-radius: 50%;
}

.target-ring.watl-ring-3 {
  width: 160px !important; /* 20" diameter × 8px/inch */
  height: 160px !important;
  background-color: transparent;
  border: 4px solid #000000;
  border-radius: 50%;
}

.target-ring.watl-ring-4 {
  width: 56px !important; /* 7" diameter × 8px/inch - surrounds 3.5" bullseye */
  height: 56px !important;
  background-color: transparent;
  border: 4px solid #000000;
  border-radius: 50%;
}

.target-ring.watl-ring-5 {
  width: 32px !important; /* 4" diameter × 8px/inch */
  height: 32px !important;
  background-color: transparent;
  border: 4px solid #000000;
  border-radius: 50%;
}

.target-ring.watl-bullseye {
  width: 28px !important; /* 3.5" diameter × 8px/inch */
  height: 28px !important;
  background-color: #dc2626; /* Red fill */
  border: none;
  border-radius: 50%;
  z-index: 10;
}

.target-ring.watl-killshot {
  width: 24px !important; /* 3" killshots × 8px/inch for WATL v1 */
  height: 24px !important;
  background-color: #1d4ed8; /* Blue fill */
  border: none; /* No border on killshots in reference image */
  border-radius: 50%;
  z-index: 15;
  position: absolute;
}

.target-ring.watl-killshot-upper {
  top: 25%;
  left: calc(50% - 102px); /* Left killshot: positioned on 1-ring at 25% vertical position */
  transform: translate(-50%, -50%);
}

.target-ring.watl-killshot-lower {
  top: 25%;
  left: calc(50% + 102px); /* Right killshot: positioned on 1-ring at 25% vertical position */
  transform: translate(-50%, -50%);
}

.target-ring.watl-killshot:focus,
.target-ring.watl-ring-1:focus,
.target-ring.watl-ring-2:focus,
.target-ring.watl-ring-3:focus,
.target-ring.watl-ring-4:focus,
.target-ring.watl-bullseye:focus,
.target-ring.watl-miss-area:focus {
  outline: 3px solid #007bff;
  outline-offset: 2px;
}

/* WATL v2 - 1.5" killshots */
.target-ring.watl-v2-killshot {
  width: 12px !important; /* 1.5" × 8px/inch */
  height: 12px !important;
  background-color: #1d4ed8;
  border: none;
  border-radius: 50%;
  z-index: 15;
  position: absolute;
}

/* WATL v3 - 1.5" bullseye + 3.5" 5-ring */
.target-ring.watl-v3-bullseye {
  width: 12px !important; /* 1.5" × 8px/inch */
  height: 12px !important;
  background-color: #dc2626;
  border: none;
  border-radius: 50%;
  z-index: 10;
}

.target-ring.watl-v3-ring-5 {
  width: 28px !important; /* 3.5" × 8px/inch */
  height: 28px !important;
  background-color: transparent;
  border: 4px solid #000000;
  border-radius: 50%;
}

/* WATL v4 - Multiple outer elements */
.target-ring.watl-v4-outer-5ring {
  width: 16px !important; /* 2" × 8px/inch */
  height: 16px !important;
  background-color: transparent;
  border: 3px solid #000000;
  border-radius: 50%;
  position: absolute;
  z-index: 12;
}

.target-ring.watl-v4-outer-bullseye {
  width: 6px !important; /* 0.75" × 8px/inch */
  height: 6px !important;
  background-color: #dc2626;
  border: none;
  border-radius: 50%;
  position: absolute;
  z-index: 13;
}

.target-ring.watl-v4-inner-killshot {
  width: 6px !important; /* 0.75" × 8px/inch */
  height: 6px !important;
  background-color: #1d4ed8;
  border: none;
  border-radius: 50%;
  position: absolute;
  z-index: 14;
}

.target-ring.watl-v4-lower-killshot {
  width: 12px !important; /* 1.5" × 8px/inch */
  height: 12px !important;
  background-color: #1d4ed8;
  border: none;
  border-radius: 50%;
  position: absolute;
  z-index: 15;
}

/* WATL v5 - Expanded outer elements */
.target-ring.watl-v5-outer-5ring {
  width: 28px !important; /* 3.5" × 8px/inch */
  height: 28px !important;
  background-color: transparent;
  border: 3px solid #000000;
  border-radius: 50%;
  position: absolute;
  z-index: 12;
}

.target-ring.watl-v5-outer-bullseye {
  width: 12px !important; /* 1.5" × 8px/inch */
  height: 12px !important;
  background-color: #dc2626;
  border: none;
  border-radius: 50%;
  position: absolute;
  z-index: 13;
}

/* Tournament Table - Google Sheets Style */
.tournament-table-container {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tournament-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.tournament-table thead th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #d1d5db;
  border-right: 1px solid #e5e7eb;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.tournament-table thead th:last-child {
  border-right: none;
}

.tournament-table tbody td {
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  padding: 12px 16px;
  vertical-align: top;
  background-color: #ffffff;
}

.tournament-table tbody td:last-child {
  border-right: none;
}

.tournament-table tbody tr:hover {
  background-color: #f9fafb;
}

.tournament-table tbody tr:hover td {
  background-color: #f9fafb;
}

/* Column-specific styling */
.stage-cell, .bracket-cell, .round-cell {
  text-align: center;
  font-weight: 600;
  color: #6b7280;
  min-width: 80px;
}

.time-cell {
  text-align: center;
  font-weight: 500;
  color: #6b7280;
  min-width: 100px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
}

.status-cell {
  text-align: center;
  min-width: 100px;
}


.summary-cell {
  min-width: 280px;
  padding: 8px 12px;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.status-completed {
  background-color: #d1fae5;
  color: #065f46;
}

.status-badge.status-active {
  background-color: #fef3c7;
  color: #92400e;
}

.status-badge.status-pending {
  background-color: #e5e7eb;
  color: #374151;
}

/* Player links */
.player-link {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.player-link:hover {
  color: #1d4ed8;
  border-bottom-color: #1d4ed8;
  text-decoration: none;
}

.player-link.winner {
  color: #059669;
}

.player-link.winner:hover {
  color: #047857;
  border-bottom-color: #047857;
}

.player-link.loser {
  color: #dc2626;
}

.player-link.loser:hover {
  color: #b91c1c;
  border-bottom-color: #b91c1c;
}

/* Match summary styling */
.match-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.summary-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.score-line {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.player-name {
  font-weight: 600;
  font-size: 14px;
}

.player-name.winner {
  color: #059669;
}

.player-name.loser {
  color: #dc2626;
}

.vs-text {
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
}

.total-score {
  font-weight: 700;
  font-size: 15px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.total-score.winner-score {
  color: #059669;
}

.total-score.loser-score {
  color: #dc2626;
}

.score-separator {
  color: #6b7280;
  font-weight: 600;
  margin: 0 2px;
}

.game-breakdown {
  color: #6b7280;
  font-size: 12px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  margin-left: 8px;
}

.no-data {
  color: #9ca3af;
  font-style: italic;
  font-size: 13px;
}

/* Player table specific styles */
.player-row.winner {
  background-color: #fef3c7 !important;
  border-left: 4px solid #f59e0b;
}

.player-row.winner:hover {
  background-color: #fde68a !important;
}

.rank-cell {
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  min-width: 60px;
}

.player-name {
  font-weight: 600;
  color: #1f2937;
}

.player-link {
  color: #2c5aa0;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.player-link:hover {
  color: #1e40af;
  text-decoration: underline;
}

.tournament-link {
  color: #2c5aa0;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.tournament-link:hover {
  color: #1e40af;
  text-decoration: underline;
}

.score-cell {
  text-align: center;
  font-weight: bold;
  color: #059669;
  font-size: 16px;
}

.attempts-cell, .perfect-cell, .average-cell {
  text-align: center;
}

.percentage {
  color: #6b7280;
  font-size: 12px;
  margin-left: 4px;
}

.accuracy-cell {
  text-align: center;
  min-width: 100px;
}

.accuracy-bar {
  width: 60px;
  height: 6px;
  background-color: #e5e7eb;
  border-radius: 3px;
  margin: 4px auto 0;
  overflow: hidden;
}

.accuracy-fill {
  height: 100%;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .tournament-table {
    font-size: 13px;
  }
  
  .tournament-table thead th,
  .tournament-table tbody td {
    padding: 10px 12px;
  }
  
  .summary-cell {
    min-width: 200px;
  }
  
  .summary-line, .score-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  
  .game-breakdown {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .tournament-table {
    font-size: 12px;
  }
  
  .tournament-table thead th,
  .tournament-table tbody td {
    padding: 8px 10px;
  }
  
  .summary-cell {
    min-width: 160px;
  }
  
  
  .stage-cell, .bracket-cell, .round-cell {
    min-width: 60px;
  }
  
  .time-cell {
    min-width: 80px;
    font-size: 12px;
  }
}

/* Tournament sections */

.matches-section h2 {
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 8px;
  margin-bottom: 20px;
}

/* Score table styling */
.score-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
  font-size: 12px;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.score-table thead th {
  background-color: #f9fafb;
  border-bottom: 1px solid #d1d5db;
  border-right: 1px solid #e5e7eb;
  padding: 6px 8px;
  text-align: center;
  font-weight: 600;
  color: #374151;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.score-table thead th:last-child {
  border-right: none;
}

.score-table tbody td {
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  padding: 6px 8px;
  text-align: center;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  font-weight: 600;
}

.score-table tbody td:last-child {
  border-right: none;
}

.score-table tbody td:first-child {
  text-align: left;
  font-family: inherit;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-table tbody tr.winner-row td {
  background-color: #f0fdf4;
  color: #059669;
}

.score-table tbody tr.loser-row td {
  background-color: #fef2f2;
  color: #dc2626;
}

.score-table tbody tr.winner-row td:first-child {
  color: #059669;
}

.score-table tbody tr.loser-row td:first-child {
  color: #dc2626;
}

.score-table tbody td.total-score {
  font-weight: 700;
  background-color: #f3f4f6;
}

.score-table tbody tr.winner-row td.total-score {
  background-color: #dcfce7;
  color: #047857;
}

.score-table tbody tr.loser-row td.total-score {
  background-color: #fee2e2;
  color: #b91c1c;
}

/* Accessibility improvements for practice forms */

/* 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;
}

/* Show skip links on focus */
.sr-only:focus,
.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Enhanced focus indicators for better visibility */
input[type="number"]:focus,
input[type="submit"]:focus,
button:focus,
a:focus {
  outline: 2px solid #3b82f6 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

/* Dark mode focus indicators */
@media (prefers-color-scheme: dark) {
  input[type="number"]:focus,
  input[type="submit"]:focus,
  button:focus,
  a:focus {
    outline-color: #60a5fa !important;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2) !important;
  }
}

/* Improved contrast for dark mode elements */
@media (prefers-color-scheme: dark) {
  .dark\:bg-gray-750 {
    background-color: #374151;
  }
  
  .dark\:bg-gray-800 {
    background-color: #1f2937;
  }
  
  .dark\:bg-gray-700 {
    background-color: #374151;
  }
  
  .dark\:border-gray-600 {
    border-color: #4b5563;
  }
  
  .dark\:text-gray-100 {
    color: #f3f4f6;
  }
  
  .dark\:text-gray-300 {
    color: #d1d5db;
  }
  
  .dark\:text-gray-400 {
    color: #9ca3af;
  }
  
  .dark\:text-blue-400 {
    color: #60a5fa;
  }
  
  .dark\:text-blue-300 {
    color: #93c5fd;
  }
  
  .dark\:hover\:text-blue-300:hover {
    color: #93c5fd;
  }
  
  .dark\:hover\:bg-gray-700:hover {
    background-color: #374151;
  }
  
  .dark\:bg-blue-500 {
    background-color: #3b82f6;
  }
  
  .dark\:hover\:bg-blue-600:hover {
    background-color: #2563eb;
  }
  
  .dark\:focus\:ring-blue-400:focus {
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.5);
  }
  
  .dark\:focus\:ring-offset-gray-800:focus {
    box-shadow: 0 0 0 2px #1f2937, 0 0 0 4px rgba(96, 165, 250, 0.5);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  input[type="number"],
  input[type="submit"],
  button,
  a {
    border: 2px solid currentColor !important;
  }
  
  input[type="number"]:focus,
  input[type="submit"]:focus,
  button:focus,
  a:focus {
    outline: 3px solid #000 !important;
    outline-offset: 2px !important;
    background-color: #fff !important;
    color: #000 !important;
  }
}

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

/* Table accessibility improvements */
table[role="table"] {
  border-collapse: separate;
  border-spacing: 0;
}

table[role="table"] th,
table[role="table"] td {
  border: 1px solid #d1d5db;
  padding: 0.5rem;
}

@media (prefers-color-scheme: dark) {
  table[role="table"] th,
  table[role="table"] td {
    border-color: #4b5563;
  }
}

/* Enhanced table navigation for screen readers */
table[role="table"] th[scope="col"],
table[role="table"] th[scope="row"] {
  font-weight: 600;
  background-color: #f9fafb;
}

@media (prefers-color-scheme: dark) {
  table[role="table"] th[scope="col"],
  table[role="table"] th[scope="row"] {
    background-color: #374151;
    color: #f3f4f6;
  }
}

/* Skip links styling */
.skip-links {
  position: absolute;
  top: -1000px;
  left: -1000px;
  height: 1px;
  width: 1px;
  text-align: left;
  overflow: hidden;
}

.skip-links:focus,
.skip-links:active {
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  overflow: visible;
  z-index: 1000;
  padding: 1rem;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid #fff;
}

/* Form input improvements for accessibility */
input[type="number"] {
  min-height: 2.5rem; /* 40px minimum touch target */
  min-width: 2.5rem;
}

/* Error and validation styling */
input[aria-invalid="true"] {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 1px #dc2626 !important;
}

input[aria-invalid="true"]:focus {
  outline-color: #dc2626 !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1) !important;
}

/* Live region announcements */
[aria-live] {
  font-weight: normal;
}

/* Better visibility for placeholder text */
input::placeholder {
  color: #6b7280;
  opacity: 1;
}

@media (prefers-color-scheme: dark) {
  input::placeholder {
    color: #9ca3af;
  }
}

/* Ensure adequate color contrast for links */
a {
  color: #1d4ed8;
  text-decoration: underline;
}

a:hover {
  color: #1e40af;
}

a:focus {
  color: #1e40af;
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
  a {
    color: #60a5fa;
  }
  
  a:hover,
  a:focus {
    color: #93c5fd;
  }
}

/* Improved button contrast */
button,
input[type="submit"] {
  min-height: 2.75rem; /* 44px minimum touch target */
  min-width: 2.75rem;
  font-weight: 600;
}

/* Ensure proper spacing for touch targets */
button,
input[type="submit"],
a {
  margin: 0.25rem;
}

/* Status and role indicators */
[role="status"],
[aria-live="polite"],
[aria-live="assertive"] {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

/* Missing Tailwind responsive classes - manual fix for Tailwind v4 issue */
@media (min-width: 1024px) {
  .lg\:pl-64 {
    padding-left: 16rem; /* 256px / 16 = 16rem */
  }
  
  .lg\:w-64 {
    width: 16rem; /* 256px / 16 = 16rem */
  }
  
  .lg\:fixed {
    position: fixed;
  }
  
  .lg\:inset-y-0 {
    top: 0;
    bottom: 0;
  }
  
  .lg\:z-50 {
    z-index: 50;
  }
  
  .lg\:flex {
    display: flex;
  }
  
  .lg\:flex-col {
    flex-direction: column;
  }
  
  .lg\:hidden {
    display: none;
  }
  
  .lg\:block {
    display: block;
  }
  
  .lg\:h-6 {
    height: 1.5rem; /* 24px / 16 = 1.5rem */
  }
  
  .lg\:w-px {
    width: 1px;
  }
  
  .lg\:bg-gray-900\/10 {
    background-color: rgb(17 24 39 / 0.1);
  }
  
  .lg\:gap-x-6 {
    column-gap: 1.5rem; /* 24px / 16 = 1.5rem */
  }
  
  .lg\:px-8 {
    padding-left: 2rem; /* 32px / 16 = 2rem */
    padding-right: 2rem;
  }
}
