/* /admin/hypotheses — the sales hypotheses grid. A spreadsheet's look on
   purpose (thin grid lines, a grey header row that stays put, a quiet hover):
   it is read the way a sheet is, across a row, and compared down a column.
   Green is reserved for us and money, red for losses, so the statuses use
   neither as decoration: Active is blue, Paused amber, and Complete,
   Backlog and Canceled are greys of different weight — a finished bet is
   not necessarily a won one. */

.hyp { max-width: 1400px; }

.hyp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 18px; }
.hyp-title { margin-bottom: 4px; }
.hyp-lede { margin: 0; max-width: 640px; font-size: 13.5px; line-height: 1.5; color: var(--text-light-body); }

.hyp-new {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 13.5px; font-weight: 600;
  color: #FFFFFF; background: #1A73E8;
  border: none; border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(26, 115, 232, 0.3);
}
.hyp-new:hover { background: #1765CC; }
.hyp-new span { font-size: 17px; line-height: 1; }

.hyp-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid #E3E6EA; margin-bottom: 14px; }
.hyp-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px 9px;
  font-size: 13px; color: #5F6368; text-decoration: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.hyp-tab:hover { color: #202124; }
.hyp-tab.is-active { color: #1A73E8; border-bottom-color: #1A73E8; font-weight: 600; }
.hyp-tab-count { font-family: var(--font-mono); font-size: 11.5px; color: #80868B; background: #F1F3F4; border-radius: 999px; padding: 1px 7px; }
.hyp-tab.is-active .hyp-tab-count { color: #1A73E8; background: #E8F0FE; }

/* The grid scrolls inside its own box, both ways, so the header row stays
   put while a long list scrolls under it. */
.hyp-grid-wrap { overflow: auto; max-height: calc(100vh - 240px); border: 1px solid #DADCE0; border-radius: 8px; background: #FFFFFF; }
.hyp-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; color: #202124; }
.hyp-grid th {
  position: sticky; top: 0; z-index: 1;
  text-align: start; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: #5F6368;
  background: #F8F9FA;
  padding: 9px 10px;
  border-bottom: 1px solid #DADCE0;
  border-inline-end: 1px solid #E8EAED;
}
.hyp-grid td {
  padding: 9px 10px;
  border-bottom: 1px solid #E8EAED;
  border-inline-end: 1px solid #F1F3F4;
  vertical-align: middle;
  white-space: nowrap;
}
.hyp-grid th:last-child, .hyp-grid td:last-child { border-inline-end: none; }
.hyp-grid tbody tr:last-child td { border-bottom: none; }
.hyp-row { cursor: pointer; }
.hyp-row:hover td { background: #F8FAFF; }
.hyp-row:focus-visible { outline: 2px solid #1A73E8; outline-offset: -2px; }

.hyp-col-tag { width: 1%; }
.hyp-col-title { min-width: 180px; }
.hyp-cell-title { font-weight: 600; white-space: normal; }
.hyp-col-audience { min-width: 160px; max-width: 220px; }
/* Two lines of the audience at most; the whole of it is in the popup and the hover title. */
.hyp-clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; font-size: 12.5px; line-height: 1.4; color: #5F6368; }

.hyp-tag {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: #174EA6; background: #E8F0FE;
  border: 1px solid transparent; border-radius: 4px;
  padding: 2px 7px;
  cursor: copy;
}
.hyp-tag:hover { border-color: #AECBFA; }
.hyp-tag.is-copied { color: #FFFFFF; background: #1A73E8; }
.hyp-tag--static { cursor: text; user-select: all; }

.hyp-chip { font-size: 12px; color: #3C4043; background: #F1F3F4; border-radius: 4px; padding: 2px 8px; }

.hyp-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; border-radius: 999px; padding: 2px 10px 2px 8px; }
.hyp-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hyp-status--backlog { color: #5F6368; background: #F1F3F4; }
.hyp-status--active { color: #1967D2; background: #E8F0FE; }
.hyp-status--paused { color: #8A5A00; background: #FEF3DC; }
.hyp-status--complete { color: #202124; background: #E8EAED; }
.hyp-status--canceled { color: #80868B; background: #F8F9FA; text-decoration: line-through; }

.hyp-date { font-size: 12.5px; color: #3C4043; font-variant-numeric: tabular-nums; }
.hyp-num { text-align: end !important; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.hyp-rate { display: block; font-size: 11px; color: #80868B; }

.hyp-empty { padding: 40px 24px; text-align: center; color: var(--text-light-body); font-size: 14px; border: 1px dashed #DADCE0; border-radius: 8px; }
.hyp-empty p { margin: 0 0 14px; }

/* The popup. */
.hyp-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: none; border-radius: 12px;
  box-shadow: 0 24px 64px rgba(32, 33, 36, 0.28);
  color: #202124;
}
.hyp-dialog::backdrop { background: rgba(32, 33, 36, 0.45); }
.hyp-form { padding: 22px 24px 20px; }
.hyp-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.hyp-dialog-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin: 0; }
.hyp-dialog-sub { margin: 6px 0 0; font-size: 12.5px; color: #5F6368; }
.hyp-dialog-close { background: none; border: none; font-size: 24px; line-height: 1; color: #5F6368; cursor: pointer; padding: 0 4px; }
.hyp-dialog-close:hover { color: #202124; }

.hyp-field { flex: 1; margin-bottom: 14px; }
.hyp-field label { display: block; font-size: 12px; font-weight: 600; color: #5F6368; margin-bottom: 5px; }
.hyp-field-row { display: flex; gap: 12px; }
.hyp-input {
  display: block; width: 100%; box-sizing: border-box;
  font: inherit; font-size: 14px; color: #202124;
  background: #FFFFFF;
  border: 1px solid #DADCE0; border-radius: 6px;
  padding: 8px 10px;
}
textarea.hyp-input { resize: vertical; line-height: 1.45; }
.hyp-input:focus { outline: none; border-color: #1A73E8; box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15); }
.hyp-hint { margin: -4px 0 16px; font-size: 12px; color: #80868B; }

.hyp-errors { margin: 0 0 14px; padding: 10px 14px 10px 28px; font-size: 13px; color: #8A5A00; background: #FEF3DC; border-radius: 6px; }

.hyp-dialog-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 14px; border-top: 1px solid #E8EAED; }
.hyp-meta { margin-inline-end: auto; font-size: 12px; color: #80868B; }
.hyp-btn { font: inherit; font-size: 13.5px; font-weight: 600; color: #1A73E8; background: #FFFFFF; border: 1px solid #DADCE0; border-radius: 6px; padding: 8px 16px; cursor: pointer; }
.hyp-btn:hover { background: #F8FAFF; }
.hyp-btn--primary { color: #FFFFFF; background: #1A73E8; border-color: #1A73E8; }
.hyp-btn--primary:hover { background: #1765CC; }

@media (max-width: 640px) {
  .hyp-head { flex-direction: column; }
  .hyp-field-row { flex-direction: column; gap: 0; }
}
