/* F1 Results page — dark theme, no Tailwind dependency */

.f1-results-page {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  color: #e2e8f0;
}

.f1-results-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  margin-bottom: 2rem;
}

.f1-results-hero {
  background: linear-gradient(135deg, #111827 0%, #1f2937 45%, #9a3412 100%);
  color: #f8fafc;
  padding: 1.5rem 1.75rem;
}

.f1-results-hero h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.f1-results-hero p {
  margin: 0;
  color: #cbd5e1;
  max-width: 48rem;
  line-height: 1.5;
}

.f1-results-hero .f1-results-schema-note {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #fed7aa;
}

.f1-results-empty {
  padding: 2rem;
  text-align: center;
  color: #94a3b8;
}

.f1-results-empty p:first-child {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

.f1-results-empty p:last-child {
  font-size: 0.875rem;
  margin: 0;
}

.f1-results-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.75rem;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

@media (min-width: 768px) {
  .f1-results-toolbar {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.f1-results-toolbar-main {
  flex: 1;
  min-width: 0;
}

.f1-results-toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.f1-results-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 0.25rem;
}

.f1-results-field select {
  min-width: 9rem;
  max-width: 14rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #475569;
  border-radius: 0.375rem;
  background-color: #0f172a;
  color: #e2e8f0;
  font-size: 0.875rem;
  color-scheme: dark;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  padding-right: 2rem;
}

.f1-results-field select option {
  background-color: #0f172a;
  color: #e2e8f0;
}

.f1-results-field--season select {
  min-width: 5.5rem;
  max-width: 7rem;
}

.f1-results-field select:focus {
  outline: 2px solid #f97316;
  outline-offset: 1px;
  border-color: #64748b;
}

.f1-results-race-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: #f1f5f9;
}

.f1-results-race-meta {
  font-size: 0.875rem;
  color: #94a3b8;
  margin: 0;
}

.f1-results-imported-note,
.f1-results-phase-note {
  font-size: 0.875rem;
  color: #fb923c;
  margin: 0.35rem 0 0;
}

.f1-results-panels {
  min-height: 12rem;
}

.f1-results-empty-selection {
  padding: 2.5rem 1.75rem;
  text-align: center;
  color: #94a3b8;
}

.f1-results-empty-selection p {
  margin: 0;
  font-size: 0.9375rem;
}

.f1-results-panel-note {
  font-size: 0.875rem;
  color: #94a3b8;
  margin: -0.5rem 0 1rem;
}

.f1-results-highlights {
  padding: 0 1.75rem;
  background: #172033;
  border-bottom: 1px solid #334155;
}

.f1-results-highlights-summary {
  cursor: pointer;
  list-style: none;
  padding: 0.875rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e2e8f0;
  user-select: none;
}

.f1-results-highlights-summary::-webkit-details-marker {
  display: none;
}

.f1-results-highlights-summary::before {
  content: "▸ ";
  display: inline-block;
  color: #94a3b8;
  transition: transform 0.15s ease;
}

.f1-results-highlights[open] .f1-results-highlights-summary::before {
  content: "▾ ";
}

.f1-results-highlights-body {
  padding-bottom: 1rem;
}

.f1-results-highlights-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.75rem;
}

.f1-results-highlights-actions button {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  color: #94a3b8;
  text-decoration: underline;
  cursor: pointer;
}

.f1-results-highlights-actions button:hover {
  color: #fb923c;
}

.f1-results-highlights-action-sep {
  color: #64748b;
  font-size: 0.75rem;
}

.f1-results-highlights-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.f1-results-highlight-matchup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.f1-results-highlight-matchup.is-user-matchup {
  padding: 0.5rem 0.75rem;
  margin: 0 -0.75rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.06);
}

.f1-results-highlight-vs {
  color: #64748b;
  font-weight: 600;
}

.f1-results-highlight-team--no-lineup {
  color: #64748b;
}

.f1-results-highlight-team-label {
  white-space: nowrap;
}

.f1-results-highlight-option {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
}

.f1-results-highlight-option .f1-team-highlight-toggle {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
  border: 1.5px solid #64748b;
  border-radius: 0.2rem;
  background-color: #0f172a;
  position: relative;
  box-sizing: border-box;
}

.f1-results-highlight-option .f1-team-highlight-toggle.is-highlight-checked::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 44%;
  width: 0.28rem;
  height: 0.52rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

.f1-results-highlight-option .f1-team-highlight-toggle:focus-visible {
  outline: 2px solid #94a3b8;
  outline-offset: 2px;
}

.f1-results-highlight-manager {
  font-size: 0.75rem;
  font-weight: 400;
  color: #64748b;
}

.f1-results-highlight-option.is-mine .f1-results-highlight-manager {
  color: #94a3b8;
}

.f1-results-highlight-option.is-mine {
  font-weight: 600;
  color: #f8fafc;
}

.f1-results-highlight-option.is-mine .f1-results-highlight-team-label {
  color: #f8fafc;
}

.f1-results-section {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid #334155;
}

.f1-results-section:last-child {
  border-bottom: none;
}

.f1-results-section-title {
  font-size: 1.125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1rem;
}

.f1-results-section-title--qualifying { color: #60a5fa; }
.f1-results-section-title--sprint { color: #fb923c; }
.f1-results-section-title--race { color: #4ade80; }
.f1-results-section-title--grid { color: #c4b5fd; }

.f1-results-driver-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  vertical-align: middle;
}

.f1-results-driver-cell .badge {
  flex-shrink: 0;
  margin-right: 0;
}

.f1-results-driver-name {
  white-space: nowrap;
}

.f1-results-table-wrap {
  overflow-x: auto;
}

.f1-results-table,
.f1-results-page .session-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  border: 1px solid #334155;
  border-radius: 0.375rem;
  overflow: hidden;
}

.f1-results-table thead,
.f1-results-page .session-table thead {
  background: #111827;
  color: #e2e8f0;
}

.f1-results-table th,
.f1-results-page .session-table th {
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid #334155;
}

.f1-results-table th.f1-sortable,
.f1-results-page .session-table th.f1-sortable {
  cursor: pointer;
  user-select: none;
}

.f1-results-table th.f1-sortable:hover,
.f1-results-page .session-table th.f1-sortable:hover {
  color: #fb923c;
}

.f1-results-table th.f1-sortable.is-sorted-asc::after,
.f1-results-page .session-table th.f1-sortable.is-sorted-asc::after {
  content: " ▲";
  font-size: 0.65rem;
  color: #fb923c;
}

.f1-results-table th.f1-sortable.is-sorted-desc::after,
.f1-results-page .session-table th.f1-sortable.is-sorted-desc::after {
  content: " ▼";
  font-size: 0.65rem;
  color: #fb923c;
}

.f1-results-table th.is-center,
.f1-results-page .session-table th.is-center,
.f1-results-table td.is-center,
.f1-results-page .session-table td.is-center {
  text-align: center;
}

.f1-results-table th.is-right,
.f1-results-table td.is-right {
  text-align: right;
}

.f1-results-table td,
.f1-results-page .session-table td {
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
  color: #e2e8f0;
  border-bottom: 1px solid #1e293b;
}

.f1-results-table tbody tr,
.f1-results-page .session-table tbody tr {
  background: #0f172a;
}

.f1-results-table tbody tr:nth-child(even),
.f1-results-page .session-table tbody tr:nth-child(even) {
  background: #131c31;
}

.f1-results-table tbody tr:hover,
.f1-results-page .session-table tbody tr:hover {
  background: #1e293b;
}

.f1-results-table tbody tr.f1-row-highlighted:hover,
.f1-results-page .session-table tbody tr.f1-row-highlighted:hover {
  filter: brightness(1.08);
}

.f1-results-table tbody tr.is-inactive,
.f1-results-page .session-table tbody tr.is-inactive {
  opacity: 0.5;
}

.f1-results-table td.is-pos-gain {
  color: #4ade80;
}

.f1-results-table td.is-pos-loss {
  color: #f87171;
}

.f1-results-table td.is-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
}

.f1-results-table td.is-strong,
.f1-results-page .session-table td.is-strong {
  font-weight: 600;
}

.f1-results-table td.is-top,
.f1-results-table tbody tr.is-align-top {
  vertical-align: middle;
}

.f1-results-table td .badge {
  margin-right: 0;
}

.f1-results-scoring-section {
  padding: 1.5rem 1.75rem;
  background: #131c31;
}

.f1-results-scoring-section h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: #f1f5f9;
}

.f1-results-scoring-section > p {
  font-size: 0.875rem;
  color: #94a3b8;
  margin: 0 0 1.5rem;
}

.f1-results-scoring-section h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: #e2e8f0;
}

.f1-results-scoring-section h4 + .f1-results-table-wrap {
  margin-bottom: 2rem;
}

.f1-results-breakdown summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fb923c;
}

.f1-results-breakdown summary::-webkit-details-marker {
  display: none;
}

.f1-results-breakdown summary:hover {
  color: #fdba74;
}

.f1-results-breakdown-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.f1-results-breakdown-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.2rem 0;
  font-size: 0.75rem;
}

.f1-results-breakdown-label {
  flex: 1;
  min-width: 0;
  color: #cbd5e1;
}

.f1-results-breakdown-points {
  flex-shrink: 0;
  min-width: 2.5rem;
}

.f1-results-breakdown-table {
  display: none;
}

.f1-results-empty-note {
  padding: 1.5rem 1.75rem;
  color: #94a3b8;
}

.f1-results-page .points-positive {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 500;
  color: #166534;
  background-color: #bbf7d0;
}

.f1-results-page .points-negative {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 500;
  color: #fff;
  background-color: #991b1b;
}

.f1-results-page .points-neutral {
  color: #64748b;
}

.f1-results-page .f1-results-muted {
  color: #64748b;
}

.f1-results-page .f1-results-tabular {
  font-variant-numeric: tabular-nums;
}
