/* The tidied Weekly backtester form (Alex 10:25 PM 10/27: today's look, labels above boxes, two columns, tidied; the same
   order and alignment as the 0DTE form). Used by the user/Pro form (partials/backtester.html) and the Admin Weekly tab
   (admin_backtester.js), so it is loaded by index.html and admin.html; tokens only (tokens.css / switch.css). */

/* Entry Settings: two columns, 50 / 50, each a stack with no gaps */
.cs-entry-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 24px; align-items: start; }
.cs-entry-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cs-entry-col > .bt-field, .cs-entry-col > div > .bt-field, .cs-entry-col > .abt-field { margin: 0; }
.cs-ticker-text { font-size: 14px; color: var(--ds-text); padding: 9px 0; }

/* a value box with something right next to it (Strike Distance + Spread Type chips; a switch slot + box) */
.cs-box-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.cs-box-row > .bt-input-wrap, .cs-box-row > .abt-input-wrap { flex: 1 1 140px; min-width: 0; max-width: 220px; }
.cs-box-row > .bt-toggle-grp, .cs-box-row > [id$="-spread-grp"] { flex: 0 0 auto; }

/* Min Credit | Credit Cap: the same label line, the same switch place, the same box height, help on the same line */
.cs-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cs-pair-label { display: flex; align-items: center; gap: 4px; min-height: 20px; }
.cs-sw-slot { flex: 0 0 auto; width: var(--ds-switch-w, 36px); height: var(--ds-switch-h, 20px); }
.cs-pair .cs-box-row > .bt-input-wrap, .cs-pair .cs-box-row > .abt-input-wrap { max-width: none; }
.cs-pair-help { font-size: 12px; color: var(--ds-muted); margin-top: 4px; line-height: 1.45; }

/* phones: one column (the left column first), no sideways scroll */
@media (max-width: 700px) {
  .cs-entry-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .cs-pair { grid-template-columns: minmax(0, 1fr); }
}

/* Date Range's one help line (the data note), the same line, height and place as the 0DTE form's (Tab 2, 11:3x PM 10/27):
   always there, so Min Credit | Credit Cap start at the same height on both forms, Custom open or not */
.cs-date-note { font-size: 12px; line-height: 18px; min-height: 18px; margin-top: 6px; color: var(--ds-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
