/* -------------------------------------------------------
   6. SECTION D: RACE FINDER / RAFI (logged-in only)
   
   Left panel (filters) + right panel (results).
   Side-by-side at desktop, stacked on mobile.
   ------------------------------------------------------- */
.horsepage_rafi_section {
  background: var(--hp-card-bg);
  border-radius: var(--hp-radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: var(--hp-gap);
}

.horsepage_rafi_title {
  font-size: 14px;
  font-weight: 700;
  padding: 10px var(--hp-pad);
  border-bottom: 1px solid var(--hp-border);
  color: var(--hp-text);
}

.horsepage_rafi_body {
  display: flex;
  gap: 0;
}

/* RAFI left panel (filters) */
.horsepage_rafi_left {
  min-width: 260px;
  width: 260px;
  background: #e6f3ff;
  border-right: 1px solid var(--hp-border);
  padding: var(--hp-pad-sm);
  flex-shrink: 0;
}

.horsepage_rafi_tabs {
  display: flex;
  margin-bottom: 10px;
  background: #d0e8ff;
  border-radius: 3px;
  overflow: hidden;
}

.horsepage_rafi_tab {
  flex: 1;
  padding: 5px 4px;
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  background: #b8d4f0;
  border: 1px solid #8bb3d9;
  cursor: pointer;
  transition: background 0.2s;
}

.horsepage_rafi_tab:hover {
  background: #a0c4e0;
}

.horsepage_rafi_tab.horsepage_active {
  background: var(--hp-green);
  color: white;
  border-color: var(--hp-green-dark);
}

.horsepage_rafi_panel {
  display: none;
}

.horsepage_rafi_panel.horsepage_active {
  display: block;
}

.horsepage_rafi_panel h4 {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--hp-blue-dark);
}

.horsepage_rafi_section_block {
  margin-bottom: 12px;
}

/* Checkbox groups in RAFI */
.horsepage_rafi_checks {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.horsepage_rafi_checks label {
  display: flex;
  align-items: center;
  font-size: 11px;
  cursor: pointer;
}

.horsepage_rafi_checks input[type="checkbox"] {
  margin-right: 5px;
  width: 13px;
  height: 13px;
}

/* Two-column checkbox layout */
.horsepage_rafi_2col {
  display: flex;
  gap: 10px;
}

.horsepage_rafi_2col .horsepage_rafi_col {
  flex: 1;
  min-width: 0;
}

.horsepage_rafi_col label {
  display: flex;
  align-items: center;
  font-size: 11px;
  margin-bottom: 3px;
  cursor: pointer;
}

/* Select inputs in RAFI */
.horsepage_rafi_select_row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
}

.horsepage_rafi_select_row label {
  font-size: 11px;
  font-weight: 700;
  min-width: 28px;
}

.horsepage_rafi_select_row select {
  flex: 1;
  padding: 2px 4px;
  font-size: 10px;
  border: 1px solid #ccc;
  border-radius: 2px;
}

.horsepage_rafi_select_row span {
  font-size: 10px;
}

/* RAFI buttons */
.horsepage_rafi_buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.horsepage_rafi_buttons button {
  padding: 4px 8px;
  font-size: 10px;
  border-radius: 3px;
  border: 1px solid;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--hp-font);
  transition: filter 0.15s;
}

.horsepage_rafi_buttons button:hover {
  filter: brightness(1.1);
}

.horsepage_rafi_btn_save   { background: #28a745; color: white; border-color: #1e7e34; }
.horsepage_rafi_btn_normal { background: #007bff; color: white; border-color: #0056b3; }
.horsepage_rafi_btn_local  { background: #6f42c1; color: white; border-color: #5a32a3; }
.horsepage_rafi_btn_hot    { background: #dc3545; color: white; border-color: #c82333; }

/* RAFI right panel (results) */
.horsepage_rafi_right {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0;
  overflow: visible;
}

.horsepage_rafi_placeholder {
  color: var(--hp-text-muted);
  font-size: 13px;
  padding: 0;
  text-align: center;
}

/* RAFI results grid header */
/* (horsepage_rafi_results classes removed — template uses .results-header / .results-row) */

.horsepage_rafi_hcell,
.horsepage_rafi_cell {
  padding: 4px 2px;
  text-align: center;
  font-size: 10px;
  border-right: 1px solid rgba(255,255,255,0.15);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horsepage_rafi_cell {
  font-size: 11px;
  border-right: 1px solid var(--hp-border);
}

/* RAFI result action buttons */
.horsepage_rafi_btn_enter {
  background: #28a745;
  color: white;
  border: 1px solid #1e7e34;
  padding: 2px 6px;
  font-size: 9px;
  border-radius: 2px;
  cursor: pointer;
  min-width: 40px;
  font-family: var(--hp-font);
}

.horsepage_rafi_btn_enter_red {
  background: #a72845;
  color: yellow;
  border: 1px solid #7e1a34;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 2px;
  cursor: pointer;
  min-width: 40px;
}

.horsepage_rafi_btn_enter_pwd {
  background: #4528a7;
  color: yellow;
  border: 1px solid #341a7e;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 2px;
  cursor: pointer;
  min-width: 40px;
  font-family: var(--hp-font);
}

/* RAFI detail/expand rows */
.horsepage_rafi_detail_row {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  margin: 2px 0;
}

.horsepage_rafi_detail_content {
  padding: 8px 10px;
  font-size: 11px;
}

.horsepage_rafi_detail_item {
  display: inline-block;
  margin-right: 10px;
  font-weight: 700;
}

.horsepage_rafi_detail_value {
  font-weight: 400;
  color: var(--hp-blue);
}

