/**
 * season_data_display_cards.css — Classificação de pilotos em cartões (DEM-133).
 * v1.0 (2026-10-30): Diretriz Visual — uma linha-cartão por piloto com foto e cor da
 *   equipe, faixa de pontos por etapa e tendência. Desktop em uma linha; celular em duas,
 *   sem rolagem lateral. Paginação/«deslize» da tabela não se aplicam aos cartões.
 */
.tab-pane.is-cards-view #classification-stage-pagination,
.tab-pane.is-cards-view .classification-scroll-hint,
.tab-pane.is-cards-view .classification-mobile-detail-btn { display: none !important; }

.sdd-cards-container {
  max-height: none !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
}

.sdd-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sdd-card {
  --sdd-team: #d4ff00;
  display: grid;
  grid-template-columns: 52px 60px minmax(180px, 1.1fr) minmax(160px, 1.4fr) 120px 44px;
  grid-template-areas: "pos photo who strip points trend";
  align-items: center;
  column-gap: 14px;
  min-height: 74px;
  padding: 8px 14px 8px 0;
  border-radius: 14px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--sdd-team) 16%, transparent) 0%, rgba(255, 255, 255, 0.03) 45%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 5px solid var(--sdd-team);
  animation: sdd-card-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.sdd-card:nth-child(n+2) { animation-delay: 0.03s; }
.sdd-card:nth-child(n+6) { animation-delay: 0.08s; }
@keyframes sdd-card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.sdd-card-pos { grid-area: pos; text-align: center; font-size: 24px; font-weight: 900; color: var(--color-text-primary, #fff); }
.sdd-card.is-p1 .sdd-card-pos { color: #ffc400; }
.sdd-card.is-p2 .sdd-card-pos { color: #d7dbe0; }
.sdd-card.is-p3 .sdd-card-pos { color: #e09a5a; }
.sdd-card.is-p1 { box-shadow: 0 0 0 1px rgba(255, 196, 0, 0.35), 0 10px 24px rgba(255, 196, 0, 0.08); }

.sdd-card-photo {
  grid-area: photo;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(var(--sdd-team), color-mix(in srgb, var(--sdd-team) 30%, #000), var(--sdd-team));
}
.sdd-card-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #15161b; display: block; }

.sdd-card-who { grid-area: who; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sdd-card-name {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-text-primary, #fff);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.sdd-card-name:hover, a.sdd-card-name:focus-visible { color: var(--color-accent, #d4ff00); }
.sdd-card-team { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; font-weight: 700; color: color-mix(in srgb, var(--sdd-team) 45%, #fff); }
.sdd-card-team img { width: 20px; height: 20px; border-radius: 5px; object-fit: contain; background: rgba(0, 0, 0, 0.35); flex: 0 0 auto; }
.sdd-card-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sdd-card-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.sdd-card-badge { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.03em; color: var(--color-text-secondary, #a9abb5); background: rgba(255, 255, 255, 0.07); }
.sdd-card-badge.is-win { color: #1a1400; background: #ffc400; }

/* Faixa de pontos por etapa: barra proporcional, melhor etapa destacada, futuras apagadas. */
.sdd-card-strip { grid-area: strip; display: flex; align-items: flex-end; gap: 5px; height: 54px; min-width: 0; }
.sdd-card-stage {
  position: relative;
  flex: 1 1 0;
  min-width: 22px;
  max-width: 54px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding-top: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.sdd-card-stage i { position: absolute; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--sdd-team) 55%, rgba(255, 255, 255, 0.15)); border-radius: 6px 6px 0 0; }
.sdd-card-stage.is-best i { background: var(--color-accent, #d4ff00); }
.sdd-card-stage b { position: relative; font-size: 11px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
.sdd-card-stage.is-best b { color: #fff; }
.sdd-card-stage small { position: relative; font-size: 9px; font-weight: 800; color: rgba(255, 255, 255, 0.55); padding-bottom: 2px; }
.sdd-card-stage.is-future { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 4px, transparent 4px 8px); }

.sdd-card-points {
  grid-area: points;
  justify-self: end;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: right;
}
.sdd-card-points strong { font-size: 26px; font-weight: 900; color: var(--color-text-primary, #fff); font-variant-numeric: tabular-nums; }
.sdd-card.is-p1 .sdd-card-points strong { color: var(--color-accent, #d4ff00); }
.sdd-card-points span { font-size: 12px; font-weight: 700; color: var(--color-text-secondary, #a9abb5); }
.sdd-card-points em { grid-column: 1 / -1; font-style: normal; font-size: 12px; font-weight: 800; color: #ff8a8a; }
.sdd-card-points em.is-leader { color: var(--color-accent, #d4ff00); text-transform: uppercase; letter-spacing: 0.12em; font-size: 10px; }
.sdd-card-points:focus-visible { outline: 2px solid var(--color-accent, #d4ff00); outline-offset: 4px; border-radius: 6px; }

.sdd-card-trend-wrap { grid-area: trend; text-align: center; }
.sdd-card-trend { font-size: 13px; font-weight: 900; }
.sdd-card-trend.is-up { color: #4cff8f; }
.sdd-card-trend.is-down { color: #ff6b6b; }
.sdd-card-trend.is-flat { color: rgba(255, 255, 255, 0.4); }

.sdd-cards-empty { padding: 24px; text-align: center; color: var(--color-text-secondary, #a9abb5); }

/* Tela cheia (modal): mesma lista, com respiro. */
#modal-table-content .sdd-cards { padding: 16px; }

@media (max-width: 767.98px) {
  .sdd-card {
    grid-template-columns: 34px 48px minmax(0, 1fr) auto;
    grid-template-areas:
      "pos photo who points"
      "strip strip strip trend";
    row-gap: 8px;
    padding: 10px 10px 10px 0;
  }
  .sdd-card-pos { font-size: 20px; }
  .sdd-card-photo { width: 46px; height: 46px; }
  .sdd-card-strip { height: 42px; padding-left: 8px; }
  .sdd-card-name { font-size: 16px; }
  .sdd-card-points strong { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .sdd-card { animation: none; }
}
