/* ehr_style_17_horsemarks.css -- small marks on the horse page and the stable list (the 11-05 Will list).       2026-11-05
   HPNEWS_20261105 (run list 581, Will item 1): the horse page news Hide / Show and the NEW badge.
   RETIREHIDE_20261105 (run list 577, Will item 5): the retired horse info grid.
   STABHBSIRE_20261105 (run list 579, Will item 8): the Homebred H on the stable list.
   HORSENEWS_20261114 (run list 673, Will 11-13): the News tab counts and the blended news list (section 5).
   The news block itself is styled in automated.css (.hp_news_*); this file only adds to it. */

/* ---- 1 Hide / Show on the news header (horsepage_articles.jinja). html.hpnews_off = folded (incJS_20_hpnews.js) ---- */
.hp_news_hd_txt { flex: 1 1 auto; }
.hp_news_tgl {
  flex: 0 0 auto; margin-left: auto; padding: 2px 10px; cursor: pointer;
  border: 1px solid #e0c99a; border-radius: 4px; background: #fff8ea;
  color: #8a5a12; font: inherit; font-size: 12px; font-weight: 600; line-height: 1.5;
}
.hp_news_tgl:hover { background: #f7ecd6; }
.hp_news_tgl_show { display: none; }
html.hpnews_off .hp_news_tgl_hide { display: none; }
html.hpnews_off .hp_news_tgl_show { display: inline; }
html.hpnews_off .hp_news_body { display: none; }
html.hpnews_off .hp_news .hp_news_hd { margin-bottom: 0; }

:root[data-theme="dark"] .hp_news_tgl { background: #2b2213; border-color: #5a4520; color: #e0b063; }
:root[data-theme="dark"] .hp_news_tgl:hover { background: #3a2f1c; }

/* ---- 2 the NEW badge by the horse name (horsepage_info_v2.jinja): a YRGE article in the last 7 days ---- */
.hp_news_newbadge {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 10px;
  background: #d97706; color: #fff; text-decoration: none; vertical-align: middle;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; line-height: 1.6;
}
.hp_news_newbadge:hover, .hp_news_newbadge:focus { background: #b45f04; color: #fff; text-decoration: none; }

/* ---- 3 a retired horse: no Stats & Rankings card, so the info grid drops its third column ---- */
@media (min-width: 600px) {
  .hp_info_grid.hp_info_grid_retired { grid-template-columns: 1fr minmax(275px, auto); }
}
@media (max-width: 1200px) and (min-width: 801px) {
  .hp_info_grid.hp_info_grid_retired { grid-template-columns: 1fr minmax(230px, auto); }
  .hp_info_grid.hp_info_grid_retired > :last-child { grid-column: auto; }
}

/* ---- 4 the Homebred H after the sire name on the stable list (stable_horses.j2, paste 579 homebred) ---- */
.stable_horse_list_col_sire .badge.h { margin-left: 4px; background: #d9ead3; color: #2f5d1f; vertical-align: 1px; cursor: help; }
:root[data-theme="dark"] .stable_horse_list_col_sire .badge.h { background: #2a4022; color: #b9dca8; }

/* ---- 5 HORSENEWS_20261114 (run list 673): the News tab (horsepage_master.jinja) and its list (horsepage_articles.jinja) ----
   .hp_newscnt_red = articles about a race still to run or run in the last 7 days, .hp_newscnt_old = older ones. */
.hp_newscnt {
  display: inline-block; box-sizing: border-box; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px;
  border-radius: 10px; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; vertical-align: 1px;
}
.hp_newscnt_red { background: #d32f2f; color: #fff; }
.hp_newscnt_old { background: #fff; color: #333; border: 1px solid #b9b9b9; line-height: 18px; }
.hp_news.hp_news_tab { margin: 10px 0 14px; }
.hp_newskey { margin-left: auto; font-size: 12px; font-weight: 600; color: #7d7365; }
.hp_newskey .hp_newscnt { margin: 0 4px 0 10px; }
.hp_news_item_fresh { border-left: 3px solid #d32f2f; padding-left: 9px; }
.hp_news_meta .hp_news_mark { padding: 1px 6px; font-size: 10px; }
@media (max-width: 600px) {
  .hp_news_tab .hp_news_hd { flex-wrap: wrap; }
  .hp_newskey { margin-left: 0; }
  .hp_newskey .hp_newscnt:first-child { margin-left: 0; }
}
:root[data-theme="dark"] .hp_newskey { color: #a1937c; }
:root[data-theme="dark"] .hp_newscnt_old { background: #f2f2f2; border-color: #f2f2f2; }
