/* School spotlight, finder, and compare tray. Tokens come from the shared site CSS. */

.rws-card.hub-spotlight {
  border-left: 4px solid var(--accent, #a9d8ee);
  margin: 0 0 24px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.hub-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--teal);
}
.hub-headline {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}
.hub-details { font-size: 14px; margin: 0 0 8px; }
.hub-quote {
  margin: 12px 0;
  padding: 0 0 0 12px;
  border-left: 2px solid var(--line);
}
.hub-quote p { font-size: 14px; margin: 0 0 4px; }
.hub-quote footer { font-size: 12px; color: var(--muted); }
.hub-checked { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.hub-spotlight .rws-btn { min-height: 44px; }

.hub-finder { min-width: 0; max-width: 100%; }
.hub-filters { margin-bottom: 8px; }
.hub-filters .rws-field { min-width: min(100%, 140px); max-width: 100%; }
.hub-filters .rws-field:has(input[type="checkbox"]) { min-height: 44px; }
.hub-count { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.hub-finder .rws-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.hub-finder .rws-empty { grid-column: 1 / -1; }

.hub-card { min-width: 0; overflow-wrap: anywhere; color: var(--ink); }
.hub-card h3.hub-name,
.hub-compare .hub-name { font-size: 20px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.3px; overflow-wrap: anywhere; }
.hub-program { font-size: 14px; margin: 0 0 4px; }
.hub-programs {
  font-size: 14px;
  margin: 0 0 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.hub-program-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 44px;
  overflow-wrap: anywhere;
  white-space: normal;
  vertical-align: middle;
}
.hub-program-note { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.hub-no-site {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 44px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted);
}
.hub-where { font-size: 14px; color: var(--muted); margin: 0; }
.hub-badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 0; }
.hub-tuition { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.hub-cost { font-size: 14px; font-weight: 600; margin: 8px 0 0; }
.hub-cost-missing { font-weight: 400; color: var(--muted); }
.hub-linkline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}
.hub-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.hub-actions .rws-btn { min-height: 44px; white-space: normal; text-align: center; max-width: 100%; }
.hub-card.rws-drag.dragging { z-index: 900; }

.hub-compare {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  z-index: 800;
  padding: 10px 16px 12px;
  max-height: 30vh;
  overflow: hidden;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}
.hub-compare[hidden] { display: none; }
body.hub-tray-on { padding-bottom: var(--hub-tray-space, calc(30vh + 16px)); }
.hub-compare-head,
.hub-compare-body {
  width: min(960px, 100%);
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
}
.hub-compare-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex: none;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.hub-compare-copy { min-width: 0; flex: 1 1 160px; }
.hub-compare-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
.hub-compare-title { font-size: 20px; font-weight: 600; margin: 0; }
.hub-compare-hint { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.hub-compare-head .rws-btn,
.hub-compare [data-toggle] { min-height: 44px; min-width: 44px; flex: none; box-sizing: border-box; }
.hub-compare.is-collapsed .hub-compare-body,
.hub-compare.is-collapsed .hub-compare-hint { display: none; }
.hub-compare.is-collapsed .hub-compare-head { margin-bottom: 0; }
.hub-compare-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.hub-compare-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  min-height: 88px;
  min-width: 0;
}
.hub-drop-hint {
  margin: 0;
  grid-column: 1 / -1;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  padding: 12px;
}
.hub-compare-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  min-width: 0;
}
.hub-compare-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.hub-compare-top .hub-name { font-size: 20px; min-width: 0; }
.hub-remove {
  min-width: 44px;
  min-height: 44px;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  border-radius: 6px;
  flex: none;
}
.hub-remove:hover { color: var(--ink); }
.hub-meta { font-size: 14px; margin: 8px 0 0; }
.hub-meta > span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.hub-compare-card em { font-style: normal; color: var(--muted); }
.hub-compare-link .rws-link { display: inline-flex; align-items: center; min-height: 44px; }
.hub-finder :focus-visible,
.hub-compare :focus-visible,
.hub-spotlight :focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

@keyframes hub-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.hub-pulse { animation: hub-pulse .32s ease; }

@media (max-width: 700px) {
  .hub-compare-row { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hub-compare {
    max-height: 60vh;
    overflow: auto;
  }
  .hub-compare:not(.is-collapsed) .hub-compare-body { overflow: visible; }
  .hub-compare:not(.is-collapsed) .hub-compare-head {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface);
    padding-bottom: 8px;
  }
  .hub-compare.is-collapsed {
    height: 56px;
    max-height: 56px;
    padding: 0 12px;
    overflow: hidden;
    justify-content: center;
  }
  .hub-compare.is-collapsed .hub-compare-copy,
  .hub-compare.is-collapsed [data-clear] { display: none; }
  .hub-compare.is-collapsed .hub-compare-head,
  .hub-compare.is-collapsed .hub-compare-actions { width: 100%; margin: 0; }
  .hub-compare.is-collapsed [data-toggle] {
    width: 100%;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hub-pulse { animation: none; }
}

/* School details dialog. The term and the value share a row until the screen is narrow. */
dialog.hub-school-dialog {
  padding: 24px;
  max-height: min(92vh, 840px);
  overflow: auto;
}
dialog.hub-school-dialog header { align-items: flex-start; gap: 8px; }
.hub-details-title {
  margin: 12px 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.hub-details dl {
  display: grid;
  grid-template-columns: minmax(8.5rem, 34%) 1fr;
  column-gap: 16px;
  row-gap: 8px;
  margin: 0 0 8px;
}
.hub-details dt {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  align-self: start;
}
.hub-details dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.hub-details .muted { color: var(--muted); }
.hub-details .hub-source { font-size: 12px; font-weight: 600; margin-left: 6px; }
.hub-detail-list { margin: 0; padding-left: 1.1em; }
.hub-detail-list li { margin: 0 0 4px; }
.hub-details-foot { font-size: 12px; color: var(--muted); margin: 16px 0 0; }
.hub-details-foot .rws-btn { font-size: 14px; margin-top: 8px; min-height: 44px; }
dialog.hub-school-dialog > .rws-btn { min-height: 44px; max-width: 100%; }
@media (max-width: 600px) {
  .hub-details dl { grid-template-columns: 1fr; row-gap: 2px; }
  .hub-details dd { margin-bottom: 8px; }
}

