/* =============================================================================
   ehr_style_12_raceslist.css — races list popup styled to match stable list
   ============================================================================= */

/* ── Expand column — matches stable page spacing ── */
.rl_th_expand { width: 30px; }
.rl_td_expand {
  width: 30px;
  text-align: center;
  padding-left: 14px;
  padding-right: 8px;
  vertical-align: middle;
}

/* ── Table base ── */
.rl_table {
  width: 100%;
  border-collapse: collapse;
}

.race_upcoming_entries_container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.rl_table thead tr {
  background-color: #E8E8D0;
}

.rl_table th {
  padding: 8px 6px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  border-bottom: 2px solid #c8c8a0;
  white-space: nowrap;
  overflow: hidden;
}

.rl_table td {
  padding: 6px 6px;
  font-size: 12px;
  vertical-align: middle;
  border-bottom: 1px solid #e5e7eb;
}

/* ── Horse name ── */
.rl_horse_name_wrap a {
  text-decoration: underline;
  text-decoration-color: #94a3b8;
  text-underline-offset: 2px;
  cursor: pointer;
  color: #166534;
}

.rl_horse_name_wrap a:hover {
  text-decoration: none;
  background-color: #dbeafe;
  border-radius: 3px;
  padding: 0 2px;
}

.rl_scratched {
  text-decoration: line-through;
  opacity: 0.6;
}

/* ── Expanded row — reuse stable list classes ── */
tr:has(> td > .stable_horse_list_expanded_info) {
  display: none;
}
tr:has(> td > .stable_horse_list_expanded_info.stable_horse_list_show) {
  display: table-row;
}

/* ── Race header ── */
.rl_race_header {
  background: #f8f9fa;
  border: 1px solid #c8c8a0;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 10px;
  margin-top: 16px;
}

.rl_race_header_top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 6px;
}

.rl_race_track {
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
}

.rl_race_id {
  font-size: 11px;
  color: #94a3b8;
}

.rl_race_title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

/* ── Wide screen: stacked lines ── */
.rl_race_cards {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rl_race_card {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
  border-bottom: 1px solid #f1f5f9;
}

.rl_race_card:last-child {
  border-bottom: none;
}

.rl_race_card_label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #94a3b8;
  min-width: 70px;
  flex-shrink: 0;
}

.rl_race_card_value {
  font-size: 12px;
  color: #1e293b;
  font-weight: 500;
}

/* ── Mobile expand toggle for extra race info ── */
.rl_race_extra {
  display: block;
}

.rl_race_extra_toggle {
  display: none;
}

/* ── Small screen: show name/type/purse/cond; hide rest behind toggle ── */
@media (max-width: 768px) {

  .rl_race_extra_toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 11px;
    color: #6b7280;
    padding: 4px 0;
    margin-top: 4px;
    user-select: none;
  }

  .rl_race_extra {
    display: none;
  }

  .rl_race_extra.rl_race_extra_open {
    display: block;
  }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .racesdrawn_col_bred,
  .racesdrawn_col_jockey,
  .racesdrawn_col_sire,
  .racesdrawn_col_usd,
  .race_upcoming_entries_col_bred,
  .race_upcoming_entries_col_notes,
  .race_upcoming_entries_col_usd,
  .race_upcoming_entries_col_epnt { display: none; }
}