/* neighbors.css */

/* ========================= */
/* NEIGHBORS PANEL - standalone */
/* ========================= */

.neighbors-panel {
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height 0.3s ease, margin-top 0.3s ease;
  -ms-overflow-style: none;
  container-type: inline-size;
  container-name: nb;
}
.neighbors-panel.open {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 0.5rem;
}


/* ========================= */
/* Show more button           */
/* ========================= */
.neighbors-more {
  cursor: pointer;
  display: block;
  width: 100%;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #4ade80;
  border-radius: 0.375rem;
  transition: background-color 0.2s, color 0.2s;
}

.neighbors-more:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #d1fae5;
}
/* ========================= */
/* Similar Matches (rows)    */
/* ========================= */
.neighbors-row {
  display: grid;
  grid-template-columns: 4rem 1fr auto 1fr 5ch; /* date | team | score | opp | badge */
  align-items: center;
  font-size: 0.875rem;
  color: #f3f4f6;
  padding: 0.45rem;
  cursor: pointer;
  transition: background-color 0.2s;
}
.neighbors-row:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* ========================= */
/* Cells inside neighbors    */
/* ========================= */
.neighbors-row .date-cell {
  font-size: 0.75rem;
  color: #9ca3af;
  text-align: center;
}

.neighbors-row .team-cell {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.neighbors-row .team-cell.main { justify-content: flex-end; padding-right: 0.5rem; }
.neighbors-row .team-cell.opp { justify-content: flex-start; padding-left: 0.5rem; }
.neighbors-row .team-cell img {
  height: 1.25rem;
  width: 1.25rem;
  object-fit: contain;
}
.neighbors-row .team-cell span {
  font-size: 0.75rem;
  font-weight: 600;
  width: 4ch; /* espace pour 4 caractères larges comme WWW */
  min-width: 4ch;
  max-width: 4ch;
  text-align: center;
}

/* ========================= */
/* Score box (neighbors only)*/
/* ========================= */
.neighbors-row .score-box {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  gap: 0.2rem;
}
.neighbors-row .score-cell {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
  min-width: 1.25rem;
  text-align: center;
}
.neighbors-row .dash {
  font-weight: 700;
  color: #e5e7eb;
  font-size: 0.75rem;
}

/* ========================= */
/* Badge                     */
/* ========================= */
.neighbors-row .ws-badge {
  display: inline-block;
  width: 5ch;
  min-width: 5ch;
  max-width: 5ch;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.neighbors-skeleton {
  height: 40px;
  margin: 0.25rem 0;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  animation: pulse 1.2s infinite;
}