/*
 * claude-scores-banner.css v1.1
 * touchdownactu.com — bandeau de scores NFL (ticker, 50px)
 * Préfixe .tda-scores pour éviter toute collision (thème + claude-nfl-calendar.css).
 */

.tda-scores {
  --b:      #e6e8ec;   /* séparateurs */
  --navy:   #1a2a4a;
  --red:    #c02331;
  --live:   #00a550;
  --txt:    #1a1a1a;
  --muted:  #6f747e;

  position: relative;
  display: block;
  width: 100%;
  min-height: 50px;
  box-sizing: border-box;
  background: #fff;
  border-top: 1px solid var(--b);
  border-bottom: 1px solid var(--b);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  user-select: none;
}

/* --- Correctif placement : si posé dans l'ancien slot #header-results
   (position:absolute; display:none) on le remet dans le flux. --------------- */
#header-results:has(.tda-scores) {
  display: block !important;
  position: static !important;
  top: auto !important;
}
#header-results:has(.tda-scores) .wrapper-resu,
#header-results:has(.tda-scores) .wrapper-magazine {
  height: auto !important;
}

/* Viewport scrollable (scrollbar masquée) */
.tda-scores__viewport {
  min-height: 50px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.tda-scores__viewport::-webkit-scrollbar { display: none; }
.tda-scores__viewport.is-dragging { scroll-behavior: auto; cursor: grabbing; }

.tda-scores__track {
  display: flex;
  align-items: stretch;
  min-height: 50px;
  width: max-content;
  min-width: 100%;
}

/* ---- Cellule de gauche « NFL / Semaine 1 » (fond blanc), collée à gauche ---- */
.tda-scores__head {
  position: sticky;
  left: 0;
  z-index: 3;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 62px;
  padding: 0 13px;
  background: #fff;
  border-right: 1px solid var(--b);
  box-shadow: 5px 0 8px -6px rgba(0, 0, 0, .15);
  text-decoration: none !important;
}
.tda-scores__head-kicker {
  font-family: 'Bebas Neue', 'Impact', sans-serif;
  font-size: 19px;
  line-height: 1;
  letter-spacing: .5px;
  color: var(--red);
}
.tda-scores__head-sub {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--navy);
  white-space: nowrap;
}

/* ---- Cellule match : 2 colonnes (équipes | méta droite) ---- */
.tda-scores__game {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0 10px;
  border-left: 1px solid var(--b);
  text-decoration: none !important;
  color: var(--txt) !important;
  transition: background .15s;
}
.tda-scores__game:hover { background: #f7f8fa; }

.tda-scores__teams {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.tda-scores__row {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  color: #666;
}
.tda-scores__row--winner { color: var(--txt); }

/* Logos — dimensions forcées (le thème applique des règles globales sur img) */
.tda-scores__logo {
  width: 20px  !important;
  height: 20px !important;
  max-width: 20px !important;
  object-fit: contain;
  flex: 0 0 auto;
  margin: 0 !important;
  display: block;
}

.tda-scores__abbr {
  flex: 0 0 auto;
  min-width: 30px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: .2px;
}
.tda-scores__row--winner .tda-scores__abbr { font-weight: 800; }

.tda-scores__score {
  margin-left: auto;
  padding-left: 6px;
  min-width: 20px;
  text-align: right;
  font-size: 13px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
}
.tda-scores__row--winner .tda-scores__score { font-weight: 800; }
.tda-scores__score:empty { display: none; }   /* pas de score → pas de colonne */

/* Méta à droite (statut / date sur 2 lignes) */
.tda-scores__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 1px;
  text-align: right;
  line-height: 1.1;
  white-space: nowrap;
}
/* Date (match à venir) : centrée verticalement */
.tda-scores__side--upcoming {
  justify-content: center;
}
.tda-scores__side-d {   /* jour */
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: #aaa;
}
.tda-scores__side-t {   /* heure */
  font-size: 10px;
  font-weight: 700;
  color: #aaa;
  font-variant-numeric: tabular-nums;
}

/* --- Match en cours : Q3 clignotant + timer à la ligne dessous (centré verticalement) --- */
.tda-scores__side--live {
  align-self: center;
}
.tda-scores__live-q {
  font-size: 11px;
  font-weight: 800;
  color: var(--live);
  letter-spacing: .3px;
  animation: tda-blink 1.2s ease-in-out infinite;
}
.tda-scores__live-c {
  font-size: 10px;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
@keyframes tda-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .15; }
}

/* Lien « Calendrier » en fin de bande */
.tda-scores__all {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 16px;
  border-left: 1px solid var(--b);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
  text-decoration: none !important;
  color: var(--navy) !important;
  white-space: nowrap;
}
.tda-scores__all svg { width: 7px; height: 12px; }
.tda-scores__all:hover { color: var(--red) !important; }

/* ---- Flèches (desktop, si débordement) ---- */
.tda-scores__nav {
  position: absolute;
  top: 0; bottom: 0;
  z-index: 4;
  width: 30px;
  border: none;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .95;
}
.tda-scores__nav svg { width: 8px; height: 14px; }
.tda-scores__nav--prev { left: 62px; }                              /* derrière la cellule marque */
.tda-scores__nav--next { right: 0; box-shadow: -8px 0 10px -6px rgba(0,0,0,.18); }
.tda-scores__nav:hover { color: var(--red); }
.tda-scores__nav[hidden] { display: none; }

/* ---- Mobile ---- */
@media (max-width: 680px) {
  .tda-scores__nav { display: none !important; }
  .tda-scores__head { min-width: 66px; padding: 0 11px; }
  .tda-scores__head-kicker { font-size: 17px; }
  .tda-scores__game { gap: 8px; padding: 10px 11px; }
  .tda-scores__abbr { min-width: 28px; }
}

/* Hauteur verrouillée : pas de safe-area (pas de viewport-fit=cover sur le site) */
@media (max-width:860px){
  .tda-bnav{
    height:var(--tda-bnav-h)!important;
    min-height:0!important;
    padding-bottom:0!important;
  }
  .tda-drawer__panel{padding-bottom:16px!important}
  body{padding-bottom:var(--tda-bnav-h)!important}
}