/* WTWR_HORSE_FIRST_RACE_NAVIGATOR_V3_MASTER_LOCAL */

/*
  CRITICAL FAILSAFE:
  Do not hide the original standalone watchlist unless the
  new horse-first navigator has successfully mounted.
*/
body.wtwr-hfrn-v3-mounted #wtwr-v8-watchlist{
  display:none!important;
}

#today #wtwr-horse-first-race-navigator-v3{
  margin:10px 0 16px;
  padding:12px;

  border:
    1px solid rgba(97,139,178,.23);

  border-radius:13px;

  background:
    linear-gradient(
      180deg,
      rgba(8,20,32,.97),
      rgba(5,14,24,.96)
    );
}

#today .wtwr-hfrn-v3-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  margin-bottom:10px;
}

#today .wtwr-hfrn-v3-titlewrap{
  min-width:0;

  display:flex;
  align-items:center;
  gap:7px;

  flex-wrap:wrap;
}

#today .wtwr-hfrn-v3-title{
  color:#ffad55;

  font-size:10px;
  font-weight:950;
  letter-spacing:.11em;
}

#today .wtwr-hfrn-v3-count{
  color:#8193a4;

  font-size:8px;
  font-weight:850;
  letter-spacing:.07em;
}

#today .wtwr-hfrn-v3-subtitle{
  color:#667b8e;

  font-size:8px;
  font-weight:750;
}

#today .wtwr-hfrn-v3-controls{
  display:flex;
  gap:5px;
}

#today .wtwr-hfrn-v3-sort{
  appearance:none;

  border:
    1px solid rgba(110,145,177,.25);

  border-radius:999px;

  padding:5px 9px;

  background:
    rgba(10,26,41,.80);

  color:#8192a3;

  font:850 8px/1 inherit;

  letter-spacing:.08em;

  cursor:pointer;
}

#today .wtwr-hfrn-v3-sort.is-active{
  border-color:
    rgba(88,169,255,.62);

  background:
    rgba(34,93,143,.28);

  color:#e8f3ff;
}

#today .wtwr-hfrn-v3-grid{
  display:grid;

  grid-template-columns:
    repeat(5,minmax(0,1fr));

  gap:7px;
}

#today .wtwr-hfrn-v3-race{
  min-width:0;

  appearance:none;

  text-align:left;

  border:
    1px solid rgba(106,143,176,.18);

  border-radius:10px;

  padding:8px;

  background:
    linear-gradient(
      180deg,
      rgba(14,31,47,.94),
      rgba(8,21,34,.95)
    );

  color:#eaf1f7;

  cursor:pointer;

  transition:
    border-color .12s ease,
    background .12s ease;
}

#today .wtwr-hfrn-v3-race:hover,
#today .wtwr-hfrn-v3-race:focus-visible{
  border-color:
    rgba(88,169,255,.52);

  background:
    linear-gradient(
      180deg,
      rgba(18,39,58,.98),
      rgba(10,26,41,.98)
    );

  outline:none;
}

#today .wtwr-hfrn-v3-racehead{
  display:flex;
  align-items:baseline;
  gap:6px;

  padding-bottom:6px;
  margin-bottom:6px;

  border-bottom:
    1px solid rgba(110,145,177,.13);
}

#today .wtwr-hfrn-v3-time{
  flex:0 0 auto;

  color:#ffad55;

  font-size:12px;
  line-height:1;
  font-weight:950;
}

#today .wtwr-hfrn-v3-meeting{
  min-width:0;

  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;

  color:#f0f4f8;

  font-size:8px;
  line-height:1.2;
  font-weight:900;

  text-transform:uppercase;
  letter-spacing:.03em;
}

#today .wtwr-hfrn-v3-horse{
  position:relative;

  display:grid;

  grid-template-columns:
    18px minmax(0,1fr) 60px;

  align-items:center;
  gap:4px;

  min-height:43px;

  margin:4px 0;

  padding:5px 4px 5px 6px;

  border-left:
    3px solid var(--horse-colour,#edf3f8);

  border-radius:7px;

  background:
    rgba(12,31,47,.88);
}

#today .wtwr-hfrn-v3-pickno{
  color:#71879a;

  font-size:7px;
  font-weight:950;

  letter-spacing:.04em;
}

/* WTWR_AI_PLACE_MARKER_20260908: small solid corner tag -- genuine AI
   Demo PLACE-bet marker only, same font size as .wtwr-hfrn-v3-pickno,
   NOT a full watermark. See horseBlock() in
   wtwr-horse-first-race-navigator-v3.js. */
#today .wtwr-hfrn-v3-ai-place-tag{
  position:absolute;
  top:3px;
  right:3px;
  z-index:1;

  padding:1px 4px;

  border-radius:4px;

  background:#2f6fd8;
  color:#fff;

  font-size:7px;
  font-weight:950;
  letter-spacing:.04em;
  line-height:1.3;
}

#today .wtwr-hfrn-v3-horse-main{
  min-width:0;

  display:flex;
  flex-direction:column;
  gap:2px;
}

#today .wtwr-hfrn-v3-horse-top{
  min-width:0;

  display:flex;
  align-items:center;
  gap:3px;
}

#today .wtwr-hfrn-v3-silk{
  flex:0 0 auto;

  border-radius:2px;

  background:
    rgba(255,255,255,.08);
}

#today .wtwr-hfrn-v3-horse-name{
  min-width:0;
  flex:1 1 auto;

  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;

  color:
    var(--horse-colour,#edf3f8)!important;

  font-size:9px;
  line-height:1.1;
  font-weight:950;
}

#today .wtwr-hfrn-v3-horse-name.wtwr-hfrn-v3-swap{
  color:#ff00ff!important;
}

#today .wtwr-hfrn-v3-horse-name.wtwr-hfrn-v3-swap ~ .wtwr-hfrn-v3-price{
  color:#ff00ff!important;
}

#today .wtwr-hfrn-v3-horse-sub{
  display:flex;
  align-items:center;
  gap:5px;
}

/* WTWR_HFRN_V3_PRICE_ON_NAME_LINE_20260908: price sits beside the horse
   name and takes the same colour -- both read var(--horse-colour). */
#today .wtwr-hfrn-v3-price{
  flex:0 0 auto;

  color:
    var(--horse-colour,#edf3f8)!important;

  font-size:8px;
  line-height:1;
  font-weight:850;
}

#today .wtwr-hfrn-v3-stall{
  color:#71879a;

  font-size:7px;
  font-weight:900;
  letter-spacing:.03em;
}

#today .wtwr-hfrn-v3-number{
  color:#71879a;

  font-size:7px;
  font-weight:900;
  letter-spacing:.03em;
}

#today .wtwr-hfrn-v3-support-wrap{
  width:60px;

  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:2px;
}

#today .wtwr-hfrn-v3-finish-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-width:27px;
  height:19px;

  padding:0 5px;

  border:
    1px solid rgba(255,255,255,.20);

  border-radius:6px;

  color:#0c1f2f;

  font-size:8px;
  line-height:1;
  font-weight:1000;

  letter-spacing:.03em;
}

/* WTWR_SECTION_D16_BADGE_COLOURS_20260907: 1st=red, 2nd/3rd=green (place
   colour), per explicit end-of-day audit instruction -- previously
   gold/silver/bronze. Lost/NR/Void badge styling removed along with the
   badges themselves (finishBadge() no longer emits them). */
#today .wtwr-hfrn-v3-finish-badge.f1{
  background:#e0343c;
  border-color:rgba(224,52,60,.55);
  color:#fff;
}

#today .wtwr-hfrn-v3-finish-badge.f2,
#today .wtwr-hfrn-v3-finish-badge.f3{
  background:#33a852;
  border-color:rgba(51,168,82,.55);
  color:#fff;
}

#today .wtwr-hfrn-v3-view{
  display:block;

  margin-top:6px;
  padding-top:5px;

  border-top:
    1px solid rgba(110,145,177,.10);

  color:#7d91a5;

  font-size:7px;
  line-height:1;
  font-weight:950;

  text-align:right;
  letter-spacing:.08em;
}

#today .wtwr-hfrn-v3-race:hover
.wtwr-hfrn-v3-view{
  color:#a8d3ff;
}

#today .wtwr-op-race.wtwr-hfrn-v3-target{
  outline:
    2px solid rgba(88,169,255,.92)!important;

  outline-offset:
    3px!important;

  box-shadow:
    0 0 0 5px rgba(88,169,255,.12),
    0 14px 34px rgba(0,0,0,.22)!important;
}

@media(max-width:1180px){
  #today .wtwr-hfrn-v3-grid{
    grid-template-columns:
      repeat(4,minmax(0,1fr));
  }
}

@media(max-width:930px){
  #today .wtwr-hfrn-v3-grid{
    grid-template-columns:
      repeat(3,minmax(0,1fr));
  }
}

@media(max-width:690px){
  #today .wtwr-hfrn-v3-grid{
    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }
}

@media(max-width:470px){
  #today .wtwr-hfrn-v3-head{
    align-items:flex-start;
    flex-direction:column;
  }

  #today .wtwr-hfrn-v3-grid{
    grid-template-columns:1fr;
  }
}
