/* ==========================================================================
   HAMCO Sports News - Scoreboard
   Full-width dedicated scoreboard with grid cards
   ========================================================================== */

/* ---- Section Wrapper ---- */
.hn-scoreboard {
  background: #0d0d0d;
  padding: 0 0 24px;
}

/* ---- Header ---- */
.hn-scoreboard-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.hn-scoreboard-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 16px;
}

.hn-scoreboard-title {
  font-family: var(--hn-font-display, 'Source Sans 3', sans-serif);
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  line-height: 1;
}

.hn-scoreboard-title svg {
  color: var(--hn-red, #FE0000);
}

.hn-scoreboard-viewall {
  font-family: var(--hn-font-ui, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--hn-red, #FE0000);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
}

.hn-scoreboard-viewall:hover {
  opacity: 0.8;
}

/* ---- Sport Tabs ---- */
.hn-scoreboard-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hn-scoreboard-tabs::-webkit-scrollbar {
  display: none;
}

.hn-scoreboard-tab {
  font-family: var(--hn-font-ui, 'Inter', sans-serif);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.hn-scoreboard-tab:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
}

.hn-scoreboard-tab.is-active {
  color: #fff;
  background: var(--hn-red, #FE0000);
  border-color: var(--hn-red, #FE0000);
}

/* ---- Body / Grid ---- */
.hn-scoreboard-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.hn-scoreboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding-top: 20px;
}

/* Collapsed: show only 1 row (4 cards) */
.hn-scoreboard-grid.is-collapsed .hn-scoreboard-card:nth-child(n+5) {
  display: none;
}

/* ---- Browse More Button ---- */
.hn-scoreboard-more {
  display: flex;
  justify-content: center;
  padding: 20px 0 4px;
}

.hn-scoreboard-more-btn {
  font-family: var(--hn-font-ui, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: var(--hn-red, #FE0000);
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: background 0.2s, transform 0.2s;
}

.hn-scoreboard-more-btn:hover {
  background: #e00000;
  transform: translateY(-1px);
}

.hn-scoreboard-more-btn svg {
  transition: transform 0.3s;
}

.hn-scoreboard-more-btn.is-expanded svg {
  transform: rotate(180deg);
}

/* ---- Game Card ---- */
.hn-scoreboard-card {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.hn-scoreboard-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.hn-scoreboard-card.is-live {
  border-color: var(--hn-green, #22c55e);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.12);
}

/* ---- Team Row ---- */
.hn-sb-team {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}

.hn-sb-team + .hn-sb-team {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hn-sb-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.hn-sb-team-info {
  flex: 1;
  min-width: 0;
}

.hn-sb-team-name {
  font-family: var(--hn-font-ui, 'Inter', sans-serif);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hn-sb-team-record {
  font-family: var(--hn-font-ui, 'Inter', sans-serif);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
  margin-top: 2px;
}

.hn-sb-score {
  font-family: var(--hn-font-display, 'Source Sans 3', sans-serif);
  font-size: 34px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  min-width: 40px;
  text-align: right;
}

/* Winner / Loser */
.hn-sb-team--winner .hn-sb-team-name {
  color: #fff;
}

.hn-sb-team--winner .hn-sb-score {
  color: #fff;
}

.hn-sb-team--loser .hn-sb-team-name {
  color: rgba(255, 255, 255, 0.35);
}

.hn-sb-team--loser .hn-sb-score {
  color: rgba(255, 255, 255, 0.3);
}

.hn-sb-team--loser .hn-sb-logo {
  opacity: 0.5;
}

/* ---- Winner Indicator ---- */
.hn-sb-winner-arrow {
  color: var(--hn-green, #22c55e);
  font-size: 10px;
  margin-right: -6px;
  flex-shrink: 0;
}

/* ---- Status Footer ---- */
.hn-sb-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hn-sb-status-text {
  font-family: var(--hn-font-ui, 'Inter', sans-serif);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hn-sb-status-text.is-live {
  color: var(--hn-green, #22c55e);
}

.hn-sb-status-text.is-final {
  color: rgba(255, 255, 255, 0.4);
}

.hn-sb-status-text.is-scheduled {
  color: rgba(255, 255, 255, 0.5);
}

.hn-sb-status-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hn-sb-broadcast {
  font-family: var(--hn-font-ui, 'Inter', sans-serif);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
}

/* ---- Sport Badge (shown in All Sports view) ---- */
.hn-sb-sport-badge {
  font-family: var(--hn-font-ui, 'Inter', sans-serif);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
}

/* ---- Live Count Badge (next to title) ---- */
.hn-sb-live-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--hn-font-ui, 'Inter', sans-serif);
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--hn-green, #22c55e);
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 12px;
  animation: hn-sb-pulse 1.5s ease-in-out infinite;
}

/* ---- Live Dot ---- */
.hn-sb-live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--hn-green, #22c55e);
  animation: hn-sb-pulse 1.5s ease-in-out infinite;
}

@keyframes hn-sb-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---- Loading / Error / Empty ---- */
.hn-sb-message {
  grid-column: 1 / -1;
  font-family: var(--hn-font-ui, 'Inter', sans-serif);
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 48px 20px;
}

.hn-sb-message.is-error {
  color: var(--hn-red, #FE0000);
}

/* ---- Skeleton ---- */
.hn-scoreboard-skeleton {
  pointer-events: none;
}

.hn-skel-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}

.hn-skel-row + .hn-skel-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hn-skel-status {
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.hn-skel-block {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  animation: hn-skel-shimmer 1.5s ease-in-out infinite;
}

@keyframes hn-skel-shimmer {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hn-scoreboard-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Show 3 per row when collapsed */
  .hn-scoreboard-grid.is-collapsed .hn-scoreboard-card:nth-child(n+4) {
    display: none;
  }
}

@media (max-width: 768px) {
  .hn-scoreboard-title-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .hn-scoreboard-title {
    font-size: 24px;
  }

  .hn-scoreboard-viewall {
    font-size: 13px;
    padding: 8px 16px;
    background: var(--hn-red, #FE0000);
    color: #fff;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-height: 44px;
    transition: background 0.2s, opacity 0.2s;
  }

  .hn-scoreboard-viewall:hover {
    opacity: 1;
    background: #d50000;
  }

  .hn-scoreboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* Show 2 per row when collapsed */
  .hn-scoreboard-grid.is-collapsed .hn-scoreboard-card:nth-child(n+3) {
    display: none;
  }

  .hn-sb-team {
    padding: 12px 14px;
    gap: 12px;
  }

  .hn-sb-logo {
    width: 30px;
    height: 30px;
  }

  .hn-sb-team-name {
    font-size: 14px;
  }

  .hn-sb-score {
    font-size: 28px;
  }

  .hn-sb-status {
    padding: 8px 14px;
  }
}

@media (max-width: 480px) {
  .hn-scoreboard-header {
    padding: 0 14px;
  }

  .hn-scoreboard-body {
    padding: 0 14px;
  }

  .hn-scoreboard-grid {
    grid-template-columns: 1fr;
  }

  /* Show 2 on mobile when collapsed */
  .hn-scoreboard-grid.is-collapsed .hn-scoreboard-card:nth-child(n+3) {
    display: none;
  }

  .hn-scoreboard-title-row {
    padding: 20px 0 12px;
  }

  .hn-scoreboard-title {
    font-size: 20px;
    gap: 8px;
  }

  .hn-scoreboard-viewall {
    width: 100%;
    justify-content: center;
    font-size: 14px;
    padding: 12px 20px;
  }

  .hn-scoreboard-tab {
    padding: 8px 14px;
    font-size: 12px;
  }
}
