/* =============================================================================
   dncg-search — public styles
   Rebranded onto the base-theme design system (Phase 3 plugin consolidation).
   Colour is always var(--token); the theme's tokens.css resolves them (the
   theme loads first). No literal colour here, 1.1rem font floor, our
   --radius/--shadow/--space/--transition scale, and the course-template design
   language (white cards, hairline + soft shadow, pill CTAs, display headings).

   Everything is scoped to a plugin wrapper (.dncg-search-autocomplete for the
   site-wide header autocomplete, .dncg-search-results-page / .dncg-search-form /
   .dncg-search-featured-bar for the rest). The previous file's bare .container
   and "override theme styles" rules are gone: the plugin no longer fights the
   theme.
   ========================================================================== */

/* =============================================================================
   1. Autocomplete dropdown (site-wide: attaches to the header search)
   ========================================================================== */
.dncg-search-autocomplete {
  position: absolute;
  z-index: 80;
  left: 0;
  right: 0;
  margin-top: 0.4rem;
  background: var(--surface);
  border: var(--hair);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: 70vh;
  overflow-y: auto;
}
.dncg-autocomplete-group + .dncg-autocomplete-group {
  border-top: var(--hair);
}
.dncg-autocomplete-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.9rem 1.2rem 0.5rem;
}
.dncg-autocomplete-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background var(--transition);
}
.dncg-autocomplete-item:hover,
.dncg-autocomplete-selected {
  background: var(--surface-alt);
}
.dncg-autocomplete-icon {
  flex-shrink: 0;
  font-size: 1.3rem;
  line-height: 1;
}
.dncg-autocomplete-item-content { min-width: 0; }
.dncg-autocomplete-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
}
.dncg-autocomplete-text { color: var(--blue-text); font-weight: 700; }
.dncg-autocomplete-meta {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* =============================================================================
   2. Search form (the [dncg_search_form] shortcode)
   ========================================================================== */
.dncg-search-form { position: relative; }
.dncg-search-input-wrapper {
  display: flex;
  gap: 0.6rem;
  position: relative;
}
.dncg-search-input {
  flex: 1 1 auto;
  min-width: 0;
  font-family: inherit;
  font-size: 1.3rem;
  color: var(--text);
  background: var(--surface);
  padding: 0.9rem 1.2rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.dncg-search-input:focus {  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(var(--blue-rgb), 0.15);
}
.dncg-search-button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  background: var(--blue);
  border: 2.5px solid var(--blue);
  border-radius: var(--radius-pill);
  padding: 0.9rem 1.8rem;
  cursor: pointer;
  transition: all var(--transition);
}
.dncg-search-button:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* =============================================================================
   3. Results page — rebuilt to design-export/search-results.html.
   A page-title search band, then a two-column (sidebar + grouped results)
   layout. Section colour is carried per-group in --sc. 0 literal colour.
   ========================================================================== */
.dncg-search-results-page { color: var(--ink); }

/* --- Search band (page-title treatment) --- */
.dncg-search-band { position: relative; overflow: hidden; background: var(--page-title-bg); }
.dncg-search-band__media {
  position: absolute; inset: 0; opacity: var(--page-title-media-opacity);
  background:
    linear-gradient(115deg, rgba(var(--tint-rgb), .94) 0%, rgba(var(--tint-rgb), .62) 100%),
    repeating-linear-gradient(135deg, rgba(var(--on-dark-rgb), .10) 0 14px, rgba(var(--on-dark-rgb), .03) 14px 28px);
}
/* padding-inline-start clears an overhanging site logo (--logo-clear, defined in
   the theme's tokens.css: 0 for every brand but UCNL, and 0 below 64em on UCNL
   too). The results band is the first thing under the header, so on UCNL desktop
   the mark hung over "Found N results for ...". Same treatment as the theme's
   .hero-page > .row. */
.dncg-search-band__inner { position: relative; max-width: var(--content-max); margin: 0 auto; padding: 3.2rem var(--page-gutter) 2.8rem; padding-inline-start: calc(var(--page-gutter) + var(--logo-clear)); }
.dncg-search-band__eyebrow { display: flex; align-items: center; gap: 12px; font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--page-title-eyebrow); margin: 0 0 1rem; }
.dncg-rule-tri { width: 28px; height: 4px; display: block; flex: 0 0 auto; background: var(--rule-tri); }
.dncg-search-band__title { font-family: var(--font-display); font-weight: var(--display-weight); color: var(--page-title-fg); font-size: clamp(2.4rem, 4vw, 3.5rem); line-height: var(--display-lh-hero); letter-spacing: var(--display-track-hero); margin: 0 0 1.4rem; }
.dncg-search-band__title em { color: var(--page-title-em); font-style: normal; }
.dncg-search-band__form { display: flex; gap: 14px; align-items: stretch; max-width: 820px; }
.dncg-search-band__form input { flex: 1 1 auto; min-width: 0; background: var(--white); border: 2px solid var(--white); border-radius: var(--radius-pill); outline: none; font-size: 1.3rem; font-weight: 700; color: var(--navy); padding: 14px 24px; }
.dncg-search-band__form input:focus { border-color: var(--accent-on-dark); }
.dncg-search-band__form button { flex: 0 0 auto; cursor: pointer; border: 0; background: var(--btn-accent-bg); color: var(--btn-accent-text); font-weight: 700; font-size: var(--fs-min); padding: 14px 34px; border-radius: var(--radius-pill); }
.dncg-search-band__notice { margin-top: 1.4rem; font-size: var(--fs-min); color: var(--page-title-muted); }
.dncg-search-band__notice a { color: var(--page-title-eyebrow); font-weight: 700; }

/* "People often search for" chips: real demand data on the empty and
   no-results states. Band variant sits on the dark title band; --onlight
   sits inside the no-results card. */
.dncg-popular { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 1.6rem; }
.dncg-popular__label { font-size: var(--fs-min); font-weight: 700; color: var(--page-title-muted); }
.dncg-popular__chip { font-size: var(--fs-min); font-weight: 700; color: var(--page-title-fg); text-decoration: none; border: 1px solid var(--page-title-muted); border-radius: var(--radius-pill); padding: .35rem 1rem; }
.dncg-popular__chip:hover { border-color: var(--page-title-fg); }
.dncg-popular--onlight .dncg-popular__label { color: var(--muted); }
.dncg-popular--onlight .dncg-popular__chip { color: var(--navy); border-color: var(--line); }
.dncg-popular--onlight .dncg-popular__chip:hover { border-color: var(--accent); }

/* --- Layout: sidebar + results (non-sticky) --- */
.dncg-search-layout { max-width: var(--content-max); margin: 0 auto; padding: 2.6rem var(--page-gutter) 3.6rem; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 2.6rem; align-items: start; }
.dncg-search-layout--single { grid-template-columns: 1fr; max-width: 900px; }

/* --- Sidebar --- */
.dncg-search-sidebar { display: flex; flex-direction: column; gap: 1.2rem; }
.dncg-jump-nav { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--light); padding: 1.5rem 1.6rem; }
.dncg-jump-nav h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.5rem; color: var(--navy); margin: 0 0 1.1rem; }
.dncg-jump-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.dncg-jump-nav a { display: flex; align-items: center; gap: 12px; text-decoration: none; background: var(--white); border: 1px solid var(--line); border-left: var(--card-edge) solid var(--sc, var(--accent)); border-radius: 8px; padding: .9rem 1rem; }
.dncg-jump-nav a:hover { border-color: var(--sc, var(--accent)); }
.dncg-jump-label { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-min); color: var(--navy); line-height: 1.25; }
.dncg-jump-count { margin-left: auto; flex: 0 0 auto; font-family: var(--font-mono); font-size: var(--fs-min); font-weight: 700; color: var(--white); background: var(--sc, var(--accent)); min-width: 34px; text-align: center; padding: 4px 10px; border-radius: var(--radius-pill); }
.dncg-jump-note { margin: 1.1rem 0 0; border-top: 1px solid var(--line); padding-top: 1rem; font-size: var(--fs-min); color: var(--muted); }
.dncg-career-facet { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--light); padding: 1.5rem 1.6rem; }
.dncg-career-facet h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.5rem; color: var(--navy); margin: 0 0 1.1rem; }
.dncg-career-facet ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.dncg-career-facet a { display: flex; align-items: center; gap: 12px; text-decoration: none; background: var(--white); border: 1px solid var(--line); border-left: var(--card-edge) solid var(--aud-employers); border-radius: 8px; padding: .9rem 1rem; }
.dncg-career-facet a:hover { border-color: var(--aud-employers); }
.dncg-facet-label { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-min); color: var(--navy); line-height: 1.25; }
.dncg-facet-count { margin-left: auto; flex: 0 0 auto; font-family: var(--font-mono); font-size: var(--fs-min); font-weight: 700; color: var(--white); background: var(--aud-employers); min-width: 34px; text-align: center; padding: 4px 10px; border-radius: var(--radius-pill); }
.dncg-adviser-card { border: 1px solid var(--line); border-radius: 8px; padding: 1.4rem 1.5rem; }
.dncg-adviser-card--accent { border-left: var(--card-edge) solid var(--aud-advisers); }
.dncg-adviser-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--navy); margin: 0 0 .5rem; }
.dncg-adviser-card p { font-size: var(--fs-min); line-height: 1.6; color: var(--muted); margin: 0 0 .8rem; }
.dncg-adviser-card a { font-size: var(--fs-min); font-weight: 700; color: var(--link); }

/* --- Results column --- */
.dncgsr-results { display: flex; flex-direction: column; gap: 2.6rem; min-width: 0; }

.dncg-rsec--courses { --sc: var(--aud-students); }
.dncg-rsec--careers { --sc: var(--aud-employers); }
.dncg-rsec--events  { --sc: var(--aud-parents); }
.dncg-rsec--info    { --sc: var(--aud-advisers); }
.dncg-rsec--news    { --sc: var(--blue); }
.dncg-rsec__head { display: flex; align-items: baseline; gap: 16px; border-bottom: 2px solid var(--sc); padding-bottom: .9rem; margin-bottom: 1.6rem; }
.dncg-rsec__head h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2.1rem; color: var(--navy); margin: 0; }
.dncg-rsec__count { font-family: var(--font-mono); font-size: var(--fs-min); color: var(--muted); }
.dncg-rsec__subhead { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--navy); margin: 1.6rem 0 1rem; }

/* Courses section split (decision 2026-08-05): subjects and courses side by
   side with equal weight on desktop, stacked on narrow screens. auto-fit lets
   a lone column take the full width. */
.dncg-rsec__split { display: grid; grid-template-columns: 1fr; gap: 0 2.4rem; align-items: start; }
.dncg-rsec__col { min-width: 0; }
.dncg-rsec__col .dncg-rsec__subhead { margin-top: 1rem; }
@media (min-width: 64em) {
	.dncg-rsec__split { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
}

/* Badges now appear only in the featured panel, where result types mix and
   the label earns its place. Quieter than the old solid pill. */
.dncg-badge { display: inline-block; font-size: var(--fs-meta); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); background: none; border: 1px solid var(--line); padding: 3px 10px; border-radius: var(--radius-pill); }

.dncg-subject-card { border: 1px solid var(--line); border-top: var(--card-edge) solid var(--sc); border-radius: var(--radius-md); padding: 1.9rem 2rem; margin-bottom: 1.6rem; background: var(--light); }
.dncg-subject-card h3 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2rem; color: var(--navy); margin: 0 0 .7rem; }
.dncg-subject-card__desc { font-size: var(--fs-min); line-height: 1.65; color: var(--ink); max-width: 74ch; margin: 0 0 1.2rem; }
.dncg-subject-card__foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.dncg-subject-card__count { font-family: var(--font-mono); font-size: var(--fs-min); color: var(--muted); margin: 0; }

.dncg-course-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
.dncg-course-list a { text-decoration: none; display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-left: var(--card-edge) solid var(--sc); border-radius: 8px; padding: 1rem 1.2rem; transition: box-shadow var(--transition); }
.dncg-course-list a:hover { box-shadow: var(--shadow-sm); }
.dncg-course-row__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.dncg-course-row__title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--navy); line-height: 1.3; }
.dncg-course-row__meta { font-size: var(--fs-min); color: var(--muted); }
.dncg-course-row__go { flex: 0 0 auto; color: var(--link); font-size: 1.3rem; font-weight: 700; }

.dncg-career-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.2rem; }
.dncgsr-career-card { border: 1px solid var(--line); border-top: var(--card-edge) solid var(--sc); border-radius: var(--radius-md); padding: 1.7rem 1.8rem; }
.dncgsr-career-card h3 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.8rem; line-height: 1.12; color: var(--navy); margin: 0 0 .7rem; max-width: 34ch; }
.dncgsr-career-card__body { font-size: var(--fs-min); line-height: 1.65; color: var(--muted); max-width: 76ch; margin: 0 0 1.1rem; }
.dncg-salary-dl { display: flex; flex-wrap: wrap; gap: 2.2rem; margin: 0 0 1.2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.dncg-salary-dl dt { font-size: var(--fs-meta); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dncg-salary-dl dd { margin: .2rem 0 0; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.dncg-routes { background: var(--light); border-radius: 8px; padding: 1.1rem 1.2rem; }
.dncg-routes__label { font-size: var(--fs-min); font-weight: 700; color: var(--navy); margin: 0 0 .7rem; }
.dncg-routes__chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.dncg-routes__chips a { text-decoration: none; border: 2px solid var(--navy); color: var(--navy); background: var(--white); font-size: var(--fs-min); font-weight: 700; padding: 7px 16px; border-radius: var(--radius-pill); }
.dncg-routes__chips a:hover { background: var(--navy); color: var(--white); }

.dncg-adviser-inline { border: 1px solid var(--line); border-left: var(--card-edge) solid var(--aud-advisers); border-radius: 8px; background: var(--light); padding: 1.2rem 1.4rem; margin-bottom: 1.6rem; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.dncg-adviser-inline p { font-size: var(--fs-min); line-height: 1.55; color: var(--ink); margin: 0; }
.dncg-adviser-inline a { font-size: var(--fs-min); font-weight: 700; color: var(--link); }

.dncg-info-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.dncg-info-card { border: 1px solid var(--line); border-top: var(--card-edge) solid var(--sc); border-radius: var(--radius-md); padding: 1.6rem 1.7rem; display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; }
.dncg-info-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; line-height: 1.2; color: var(--navy); margin: 0; }
.dncg-info-card__meta { font-family: var(--font-mono); font-size: var(--fs-min); color: var(--muted); margin: 0; }
.dncg-info-card__body { font-size: var(--fs-min); line-height: 1.6; color: var(--muted); margin: 0; }
.dncg-info-card .dncgsr-btn { margin-top: auto; }

.dncg-viewall { margin-top: 1.1rem; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; background: var(--light); border: 1px solid var(--line); border-radius: 8px; padding: 1.1rem; font-size: var(--fs-min); font-weight: 700; color: var(--navy); }
.dncg-viewall:hover { border-color: var(--navy); }

/* --- Featured / boosted panel (not in the prototype) --- */
.dncg-featured { border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius-md); background: var(--light); padding: 1.6rem 1.8rem; box-shadow: var(--shadow-sm); }
.dncg-featured__eyebrow { display: flex; align-items: center; gap: 8px; font-size: var(--fs-eyebrow); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--link); margin: 0 0 1rem; }
.dncg-featured__eyebrow svg { color: var(--accent); }
.dncg-featured__message { font-size: var(--fs-min); color: var(--ink); margin: 0 0 1rem; }
.dncg-featured__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.dncg-featured__list a { text-decoration: none; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.2rem; }
.dncg-featured__list a:hover { border-color: var(--accent); }
.dncg-badge--featured { border-color: var(--accent); color: var(--accent); }
.dncg-featured__title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--navy); }
.dncg-featured__desc { flex: 1 1 100%; font-size: var(--fs-min); color: var(--muted); }
.dncg-featured__go { margin-left: auto; color: var(--link); font-weight: 700; font-size: 1.3rem; }

/* --- Buttons (scoped to the results page) --- */
.dncgsr-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; font-size: var(--fs-min); padding: 12px 24px; border-radius: var(--radius-pill); border: 2px solid transparent; cursor: pointer; }
.dncgsr-btn--primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); border-color: var(--btn-primary-bg); }
.dncgsr-btn--primary:hover { background: var(--link-hover); border-color: var(--link-hover); }
.dncgsr-btn--accent { background: var(--btn-accent-bg); color: var(--btn-accent-text); border-color: var(--btn-accent-bg); }
.dncgsr-btn--ghost { background: transparent; color: var(--white); border-color: rgba(var(--on-dark-rgb), .6); }

/* --- Nothing / empty panel --- */
.dncg-nothing { background: var(--navy); color: var(--white); border-radius: var(--radius-md); padding: 2rem 2.2rem; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.dncg-nothing h2 { color: var(--white); font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.9rem; margin: 0 0 .5rem; }
.dncg-nothing p { font-size: var(--fs-min); line-height: 1.6; color: rgba(var(--on-dark-rgb), .85); margin: 0; max-width: 60ch; }
.dncg-nothing__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.dncg-nothing--empty { background: var(--surface-dark); }

/* --- Responsive --- */
@media (max-width: 64em) {
  .dncg-search-layout { grid-template-columns: 1fr; }
  .dncg-info-grid { grid-template-columns: 1fr; }
  .dncg-search-band__form { flex-wrap: wrap; }
}
