@layer properties, theme, base, components, utilities;
@layer components {
  .sports-news-layout { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0; flex: 1; align-items: start; }
  .sports-news-layout > main { min-width: 0; width: 100%; }
  .sports-news-sidebar { grid-row: 1; min-width: 0; margin: 16px var(--site-content-gutter, 20px) 0; }
  .sports-news-layout > main { grid-row: 2; }
  .sports-news-sidebar-panel { border: 1px solid #dce3ed; border-top: 3px solid #176747; border-radius: 12px; background: #fff; overflow: hidden; }
  .sports-news-sidebar-heading { padding: 14px 16px; font-size: 17px; font-weight: 800; line-height: 1.4; color: #182940; cursor: pointer; }
  .sports-news-sidebar-hint { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; color: #526277; }
  .sports-news-sidebar-list { list-style: none; margin: 0; padding: 0 16px; }
  .sports-news-sidebar-item { border-top: 1px solid #e7ecf2; padding: 12px 0; }
  .sports-news-sidebar-time { display: block; margin-bottom: 5px; font-size: 11px; line-height: 1.4; color: #526277; }
  .sports-news-sidebar-link { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #182940; font-size: 16px; font-weight: 600; line-height: 1.4; text-decoration: none; }
  .sports-news-sidebar-link:hover { color: #176747; text-decoration: underline; text-underline-offset: 3px; }
  .sports-news-sidebar-all { display: block; border-top: 1px solid #e7ecf2; padding: 12px 16px; background: #f1f8f4; color: #176747; font-size: 13px; font-weight: 700; }
  .sports-news-sidebar-status { padding: 12px 16px; color: #526277; font-size: 13px; line-height: 1.5; }
  .sports-news-sidebar-retry { margin: 0 16px 14px; color: #176747; text-decoration: underline; cursor: pointer; font-size: 13px; }
  .sports-news-sidebar [hidden] { display: none !important; }
  .sports-news-sidebar a:focus-visible, .sports-news-sidebar summary:focus-visible, .sports-news-sidebar button:focus-visible { outline: 2px solid #176747; outline-offset: -2px; }
  @media (min-width: 1100px) {
    .sports-news-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; width: calc(100% - 32px); max-width: 1348px; margin-inline: auto; }
    .sports-news-layout > main { grid-column: 1; grid-row: 1; margin-inline: 0; }
    .sports-news-sidebar { grid-column: 2; grid-row: 1; margin: 28px 0 24px; }
  }
  .sports-news-sidebar.sports-news-sidebar--integrated { margin: 0 0 20px; width: 100%; }
  .best-bookmakers-sidebar.has-sports-news { position: static; }
}

@layer components {
  .sidebar-forecasts-panel { margin-top: 16px; }
  .sports-news-sidebar--forecasts-only .sidebar-forecasts-panel { margin-top: 0; }
  .sidebar-forecast-list { margin: 0; padding: 0 10px 10px; list-style: none; }
  .sidebar-forecast-item + .sidebar-forecast-item { margin-top: 6px; }
  .sidebar-forecast-card { display: block; border: 1px solid #dce3ed; border-radius: 9px; padding: 8px; color: #182940; background: #f7faf8; text-decoration: none; }
  .sidebar-forecast-card:hover { border-color: #25865d; background: #edf8f0; }
  .sidebar-forecast-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 11px; line-height: 1.4; color: #526277; }
  .sidebar-forecast-league { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar-forecast-time { flex-shrink: 0; font-weight: 700; color: #176747; }
  .sidebar-forecast-title { display: grid; gap: 3px; margin: 6px 0; font-size: 13px; line-height: 1.35; font-weight: 700; }
  .sidebar-forecast-team { display: flex; align-items: center; gap: 6px; min-width: 0; }
  .sidebar-forecast-team-logo { display: block; width: 18px; height: 18px; flex: 0 0 18px; object-fit: contain; }
  .sidebar-forecast-team-name { min-width: 0; overflow-wrap: anywhere; }
  .sidebar-forecast-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .sidebar-forecast-pick { font-size: 12px; line-height: 1.5; color: #35465d; }
  .sidebar-forecast-odds { flex-shrink: 0; padding: 3px 5px; border-radius: 6px; background: #dcf1e3; color: #125630; font-size: 13px; font-weight: 800; }
  .article-latest-news { margin-top: 24px; }
  .article-latest-news .sports-news-sidebar-heading { margin: 0; cursor: default; }
  .article-latest-news .sidebar-forecast-list { display: grid; gap: 6px; }
  .article-latest-news .sidebar-forecast-item { display: flex; min-width: 0; }
  .article-latest-news .sidebar-forecast-item + .sidebar-forecast-item { margin-top: 0; }
  .article-latest-news .sidebar-forecast-card { flex: 1; min-width: 0; }
  .article-latest-news .sidebar-forecast-title { margin-bottom: 0; }
  .article-latest-news .sidebar-forecast-time { flex-shrink: 1; text-align: right; }
  .home-news-category + .home-news-category { margin-top: 6px; }
  .home-news-category > h3 {
    margin: 0 10px 8px;
    padding: 8px 12px;
    border-radius: 7px;
    border-inline-start: 4px solid var(--news-section-accent, #596579);
    background: var(--news-section-tint, #f0f2f5);
    color: var(--news-section-accent, #596579);
    font-size: 15px;
    font-weight: 800;
  }
  #home-news-football { --news-section-accent: #176747; --news-section-tint: #eaf5ee; }
  #home-news-hockey { --news-section-accent: #245c94; --news-section-tint: #eaf3fc; }
  #home-news-tennis { --news-section-accent: #607020; --news-section-tint: #f1f5e6; }
  #home-news-basketball { --news-section-accent: #934513; --news-section-tint: #fdf1e6; }
  #home-sports-news .sidebar-forecast-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #home-sports-news .sidebar-forecast-card:focus-visible { outline: 2px solid #176747; outline-offset: 1px; }
  @media (max-width: 480px) {
    .home-news-category > h3 { margin-inline: 8px; }
    #home-sports-news .sidebar-forecast-list { grid-template-columns: minmax(0, 1fr); padding-inline: 8px; }
    #home-sports-news .sidebar-forecast-meta { display: grid; gap: 2px; }
    #home-sports-news .sidebar-forecast-time { text-align: left; }
    #home-sports-news .sidebar-forecast-title { overflow-wrap: anywhere; }
  }
  @media (min-width: 640px) {
    .article-latest-news .sidebar-forecast-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
}
