/* AI Report Styles - Air Prefix */
/* Dark theme colors: bg #0d1117, card #161b22, text #c9d1d9, accent #4a9eff */

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes air-row-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================================
   BASE CONTAINER & SECTIONS
   ============================================================================ */

.air-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.air-section {
  background-color: #161b22;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

/* ============================================================================
   SUMMARY DASHBOARD
   ============================================================================ */

.air-summary {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.air-stat-card {
  flex: 1;
  min-width: 160px;
  background-color: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.2s ease;
}

.air-stat-card:hover {
  border-color: rgba(74, 158, 255, 0.3);
  background-color: rgba(74, 158, 255, 0.05);
}

.air-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #c9d1d9;
  line-height: 1;
  margin-bottom: 8px;
}

.air-stat-label {
  font-size: 0.875rem;
  color: #8b949e;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Stat card color variants */
.air-stat-correct .air-stat-value {
  color: #2ea043;
}

.air-stat-incorrect .air-stat-value {
  color: #f85149;
}

.air-stat-debatable .air-stat-value {
  color: #d29922;
}

.air-stat-missed .air-stat-value {
  color: #db6d28;
}

/* Accuracy ring (circular SVG) */
.air-accuracy-ring {
  width: 140px;
  height: 140px;
  margin: 12px 0;
}

.air-accuracy-ring circle {
  stroke-width: 6;
}

.air-accuracy-ring .air-accuracy-bg {
  stroke: rgba(255, 255, 255, 0.1);
}

.air-accuracy-ring .air-accuracy-fill {
  stroke: #2ea043;
  transition: stroke-dashoffset 0.6s ease;
}

/* ============================================================================
   FILTER BAR
   ============================================================================ */

.air-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.air-filter-select,
.air-filter-search {
  background-color: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  color: #c9d1d9;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.air-filter-select:hover,
.air-filter-search:hover {
  border-color: rgba(74, 158, 255, 0.3);
}

.air-filter-select:focus,
.air-filter-search:focus {
  outline: none;
  border-color: #4a9eff;
  background-color: rgba(74, 158, 255, 0.05);
}

.air-filter-select {
  cursor: pointer;
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b949e' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-color: #0d1117;
}

.air-filter-search {
  min-width: 220px;
  padding-left: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 10px center;
}

.air-filter-search::placeholder {
  color: #6e7681;
}

.air-filter-btn {
  background-color: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px 14px;
  color: #8b949e;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.air-filter-btn:hover {
  border-color: rgba(74, 158, 255, 0.3);
  color: #c9d1d9;
}

.air-filter-btn.air-active {
  background-color: rgba(74, 158, 255, 0.1);
  border-color: #4a9eff;
  color: #4a9eff;
}

/* ============================================================================
   TABLE STYLING
   ============================================================================ */

.air-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  margin-bottom: 24px;
}

.air-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
}

.air-table th {
  position: sticky;
  top: 0;
  background-color: #1c2128;
  color: #8b949e;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.air-table th:last-child {
  text-align: right;
}

.air-table td {
  padding: 12px;
  color: #c9d1d9;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.air-table tbody tr {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.air-table tbody tr:hover {
  background-color: #1c2128;
}

.air-table tbody tr.air-selected {
  background-color: #1a2332;
}

.air-table tbody tr.air-selected td {
  color: #58a6ff;
}

.air-table tbody tr:last-child td {
  border-bottom: none;
}

/* Row enter animation */
.air-table tbody tr {
  animation: air-row-enter 0.3s ease-out;
}

/* ============================================================================
   RATING BADGES
   ============================================================================ */

.air-rating {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  border: 1px solid;
  transition: all 0.2s ease;
}

.air-rating-correct {
  background-color: rgba(46, 160, 67, 0.13);
  color: #2ea043;
  border-color: rgba(46, 160, 67, 0.33);
}

.air-rating-correct:hover {
  background-color: rgba(46, 160, 67, 0.2);
  border-color: #2ea043;
}

.air-rating-incorrect {
  background-color: rgba(248, 81, 73, 0.13);
  color: #f85149;
  border-color: rgba(248, 81, 73, 0.33);
}

.air-rating-incorrect:hover {
  background-color: rgba(248, 81, 73, 0.2);
  border-color: #f85149;
}

.air-rating-debatable {
  background-color: rgba(210, 153, 34, 0.13);
  color: #d29922;
  border-color: rgba(210, 153, 34, 0.33);
}

.air-rating-debatable:hover {
  background-color: rgba(210, 153, 34, 0.2);
  border-color: #d29922;
}

.air-rating-missed {
  background-color: rgba(219, 109, 40, 0.13);
  color: #db6d28;
  border-color: rgba(219, 109, 40, 0.33);
}

.air-rating-missed:hover {
  background-color: rgba(219, 109, 40, 0.2);
  border-color: #db6d28;
}

/* ============================================================================
   UNIT BADGES
   ============================================================================ */

.air-unit {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: white;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.air-unit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.air-unit-scm {
  background-color: #3b82f6;
}

.air-unit-lm {
  background-color: #8b5cf6;
}

.air-unit-rk {
  background-color: #f59e0b;
}

.air-unit-tkl {
  background-color: #ef4444;
}

.air-unit-gen {
  background-color: #6b7280;
}

.air-unit-fp {
  background-color: #dc2626;
}

.air-unit-try {
  background-color: #10b981;
}

.air-unit-con {
  background-color: #14b8a6;
}

.air-unit-ko {
  background-color: #6366f1;
}

.air-unit-adv {
  background-color: #f97316;
}

.air-unit-tov {
  background-color: #ec4899;
}

.air-unit-pk {
  background-color: #e11d48;
}

.air-unit-dg {
  background-color: #0ea5e9;
}

/* ============================================================================
   LAW REFERENCE BADGES
   ============================================================================ */

.air-law {
  display: inline-block;
  padding: 4px 8px;
  background-color: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: #8b949e;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: help;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.air-law:hover {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.4);
  color: #c9d1d9;
}

.air-law-tooltip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 10px 12px;
  background-color: #1c2128;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #c9d1d9;
  font-size: 0.75rem;
  font-weight: 400;
  white-space: normal;
  max-width: 250px;
  z-index: 100;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
  line-height: 1.4;
  pointer-events: none;
}

.air-law-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1c2128;
}

.air-law:hover .air-law-tooltip {
  display: block;
}

/* ============================================================================
   COMMENT CELLS
   ============================================================================ */

.air-comment {
  color: #c9d1d9;
  font-weight: 400;
  line-height: 1.4;
}

.air-comment-positive {
  color: #2ea043;
  font-weight: 500;
}

.air-comment-improvement {
  color: #f85149;
  font-weight: 500;
}

.air-comment-question {
  color: #4a9eff;
  font-weight: 500;
}

.air-comment-observation {
  color: #c9d1d9;
}

/* ============================================================================
   PK/FK CELLS
   ============================================================================ */

.air-pk-yes::before,
.air-fk-yes::before {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: middle;
  content: 'â';
  font-weight: 700;
  font-size: 1rem;
}

.air-pk-yes::before {
  color: #2ea043;
}

.air-fk-yes::before {
  color: #4a9eff;
}

/* ============================================================================
   HALF COLUMN BADGES
   ============================================================================ */

.air-half {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.air-half-1st {
  background-color: rgba(46, 160, 67, 0.13);
  color: #2ea043;
}

.air-half-2nd {
  background-color: rgba(74, 158, 255, 0.13);
  color: #4a9eff;
}

/* ============================================================================
   INSIGHTS SECTIONS (Key Moments, Strengths, Improvements)
   ============================================================================ */

.air-insights {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.air-insight-card {
  flex: 1;
  min-width: 240px;
  background-color: #0d1117;
  border-left: 4px solid transparent;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: all 0.2s ease;
}

.air-insight-card:hover {
  background-color: #161b22;
  transform: translateY(-2px);
}

.air-insight-card .air-insight-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.air-insight-card .air-insight-text {
  flex: 1;
  line-height: 1.4;
  font-size: 0.875rem;
}

.air-strengths {
  border-left-color: #2ea043;
}

.air-strengths .air-insight-icon {
  color: #2ea043;
}

.air-improvements {
  border-left-color: #f85149;
}

.air-improvements .air-insight-icon {
  color: #f85149;
}

.air-key-moment {
  border-left-color: #d29922;
}

.air-key-moment .air-insight-icon {
  color: #d29922;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1100px) {
  .air-summary {
    flex-direction: column;
  }

  .air-stat-card {
    min-width: 100%;
  }

  .air-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .air-table {
    min-width: 800px;
  }
}

@media (max-width: 768px) {
  .air-container {
    padding: 16px;
  }

  .air-section {
    padding: 16px;
    margin-bottom: 16px;
  }

  .air-filters {
    flex-direction: column;
    gap: 10px;
  }

  .air-filter-select,
  .air-filter-search {
    width: 100%;
    padding: 10px 12px;
  }

  .air-filter-search {
    min-width: 100%;
  }

  .air-filter-btn {
    width: 100%;
    padding: 10px 12px;
  }

  .air-stat-card {
    min-width: 100%;
    padding: 16px;
  }

  .air-stat-value {
    font-size: 1.5rem;
  }

  .air-stat-label {
    font-size: 0.75rem;
  }

  .air-table {
    font-size: 0.8rem;
  }

  .air-table th,
  .air-table td {
    padding: 10px 8px;
  }

  .air-rating {
    padding: 3px 8px;
    font-size: 0.7rem;
  }

  .air-unit {
    padding: 2px 6px;
    font-size: 0.65rem;
  }

  .air-insights {
    gap: 12px;
  }

  .air-insight-card {
    min-width: 100%;
    padding: 12px 14px;
  }

  .air-law-tooltip {
    max-width: 200px;
    font-size: 0.7rem;
  }

  .air-accuracy-ring {
    width: 100px;
    height: 100px;
  }

  .air-accuracy-ring circle {
    stroke-width: 5;
  }
}

@media (max-width: 480px) {
  .air-container {
    padding: 12px;
  }

  .air-section {
    padding: 12px;
    margin-bottom: 12px;
  }

  .air-summary {
    gap: 8px;
  }

  .air-stat-card {
    padding: 12px;
    border-radius: 6px;
  }

  .air-stat-value {
    font-size: 1.25rem;
  }

  .air-stat-label {
    font-size: 0.65rem;
  }

  .air-filters {
    gap: 8px;
  }

  .air-filter-select,
  .air-filter-search {
    padding: 8px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
  }

  .air-table {
    font-size: 0.75rem;
  }

  .air-table th {
    padding: 8px 6px;
    font-size: 0.65rem;
  }

  .air-table td {
    padding: 8px 6px;
  }

  .air-insights {
    flex-direction: column;
    gap: 10px;
  }

  .air-insight-card {
    min-width: 100%;
    border-radius: 6px;
  }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.air-no-wrap {
  white-space: nowrap;
}

.air-text-center {
  text-align: center;
}

.air-text-right {
  text-align: right;
}

.air-muted {
  color: #8b949e;
}

.air-subtle {
  color: #6e7681;
}

.air-accent {
  color: #4a9eff;
}

.air-gap-sm {
  gap: 8px;
}

.air-gap-md {
  gap: 16px;
}

.air-gap-lg {
  gap: 24px;
}

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

@media (prefers-reduced-motion: reduce) {
  .air-table tbody tr,
  .air-stat-card,
  .air-filter-select,
  .air-filter-search,
  .air-rating,
  .air-unit,
  .air-insight-card,
  .air-law {
    transition: none !important;
    animation: none !important;
  }
}

@media (prefers-color-scheme: light) {
  /* Fallback for light mode - encourage dark theme usage */
  .air-container {
    background-color: #f6f8fa;
  }
}
