/* Saved rooms: one clear next step per saved place. Open in Compare leads as the filled button,
   Show on map and Remove stay buttons, and the source and guide links read as links instead of
   three more outlined buttons. Written by engine/scripts/housing-saved.mjs. */
html.ds3 body .pilot-saved-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
html.ds3 body .pilot-saved-actions a.ds3-secondary[href*="/decision/"] {
  order: -1; border-color: var(--ds3-ink, #1f1f1f); background: var(--ds3-ink, #1f1f1f); color: #fff;
}
html.ds3 body .pilot-saved-actions a.ds3-secondary[href*="/decision/"]:hover { background: #000; }
html.ds3 body .pilot-saved-actions a.ds3-secondary:not([href*="/decision/"]) {
  order: 2; min-width: 0; min-height: 44px; padding: 0; border: 0; background: none;
  color: var(--ds3-ink, #1f1f1f); font-weight: 500; text-decoration: underline; text-underline-offset: 3px;
}
html.ds3 body .pilot-saved-actions a.ds3-secondary:not([href*="/decision/"]):hover { background: none; color: #000; }
html.ds3 body .pilot-saved-actions button.ds3-secondary { order: 1; }
/* Compare: the next plan picker appears once the one before it has a plan, so a student who
   arrives with one room sees one empty picker, not three. */
html.ds3 body [data-compare-form] > label:nth-child(n+2):has(select option[value=""]:checked) ~ label { display: none; }
/* Compare: "Share this comparison" repeated the "Copy share link" button. It stays in the page as the
   copy fallback and the confirmation: hidden until the copy button either focuses it (clipboard failed)
   or writes its status ("Link copied."). */
html.ds3 body .housing-share[data-share]:not(:focus-within):has([data-share-status]:empty) {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* Compare with nothing chosen: one message, one way forward. A share button that can't share yet waits
   out of sight; the status line repeats the empty panel, so it stays for screen readers only until a
   plan is picked; "Open saved rooms" leads nowhere until something is saved. */
html.ds3 body .ds3-head-actions [data-copy-share]:disabled { display: none; }
html.ds3 body main:has([data-compare-empty]:not([hidden])) [data-compare-status] {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
html.ds3 body:has(.ds3-saved[aria-label="Saved 0"]) .ds3-compare-choices .pilot-housing-actions:not(:has(> :not(a[href*="saved=1"]))) { display: none; }
html.ds3 body:has(.ds3-saved[aria-label="Saved 0"]) [data-compare-empty] a[href*="saved=1"] { display: none; }
/* "Search housing" under the empty panel repeats the page's "Add a place" (both open /housing/). */
html.ds3 body:has(.ds3-head-actions a[href="/housing/"]) [data-compare-empty] .ds3-compare-search { display: none; }
/* compare-same.mjs: a row every chosen plan shares reads quieter and is tagged "Same";
   "Hide N matching rows" hides those rows in every column, so the subgrid stays aligned. */
html.ds3 body .fg-compare-same { display: flex; justify-content: flex-start; margin: 0 0 12px; }
html.ds3 body .fg-compare-same[hidden] { display: none; }
html.ds3 body .fg-compare-same button.ds3-secondary {
  min-height: 40px; padding: 0 14px; border: 1px solid var(--ds3-ink, #1f1f1f); border-radius: 8px;
  background: #fff; color: var(--ds3-ink, #1f1f1f); font-size: 14px; font-weight: 600; opacity: 1;
}
html.ds3 body .fg-compare-same button.ds3-secondary:hover { background: var(--ds3-well, #f6f6f4); }
html.ds3 body .ds3-compare-row[data-fg-same] dd { color: var(--ds3-muted, #6b6b6b); }
html.ds3 body .ds3-compare-row[data-fg-same] dt::after {
  content: "Same"; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: var(--ds3-well, #f6f6f4);
  color: var(--ds3-muted, #6b6b6b); font-size: 11px; font-weight: 600; letter-spacing: .02em; vertical-align: 1px;
}
html.ds3 body [data-compare-results][data-fg-same-hidden] .ds3-compare-row[data-fg-same] { display: none; }
/* saved-compare.mjs: "Compare these 3" leads the saved list; the empty state points to the places. */
html.ds3 body .fg-saved-compare { margin: 4px 0 14px; }
html.ds3 body .fg-saved-compare[hidden] { display: none; }
html.ds3 body .fg-saved-compare a.ds3-primary { display: flex; align-items: center; justify-content: center; min-height: 48px; width: 100%; }
html.ds3 body .fg-saved-empty a { font-weight: 600; }
/* With "Compare these 3" leading, each room's own Compare link steps back to an outlined button. */
html.ds3 body .fg-saved-compare:not([hidden]) + [data-pilot-saved-rooms] .pilot-saved-actions a.ds3-secondary[href*="/decision/"] {
  background: #fff; color: var(--ds3-ink, #1f1f1f);
}
html.ds3 body .fg-saved-compare:not([hidden]) + [data-pilot-saved-rooms] .pilot-saved-actions a.ds3-secondary[href*="/decision/"]:hover { background: var(--ds3-well, #f6f6f4); }
/* Compare columns: the place name and Remove share one row (Remove quieter, still a 44px target),
   so each column's header is about half as tall and the rows start higher. */
html.ds3 body .housing-compare-card > .ds3-compare-card-head:not(:has(img)) {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 6px;
}
html.ds3 body .housing-compare-card > .ds3-compare-card-head:not(:has(img)) h3 { flex: 1 1 auto; min-width: 0; margin: 0; }
html.ds3 body .housing-compare-card > .ds3-compare-card-head:not(:has(img)) .ds3-compare-remove {
  flex: 0 0 auto; min-width: 44px; min-height: 44px; margin: 0; padding: 0 2px; border: 0; background: none;
  color: var(--ds3-muted, #6b6b6b); font-weight: 500; text-decoration: underline; text-underline-offset: 3px;
}
