/* XED component repairs for the vendored Harvard stylesheets.
 *
 * Loaded LAST, after style-1..4. Those are Harvard's own Drupal CSS, kept
 * verbatim so the page matches harvard.edu — do not edit them.
 *
 * The problem they cause: style-3.css carries a Drupal/Eric-Meyer reset with
 *
 *     button { background: none; height: auto; padding: 0; color: inherit; ... }
 *
 * written OUTSIDE any cascade layer. Tailwind v4 emits every utility inside
 * `@layer utilities`, and in the CSS cascade UNLAYERED rules beat layered ones
 * no matter how specific the layered selector is. So `bg-primary`, `h-12` and
 * `px-4` were present on our buttons and silently did nothing: the brochure
 * modal's submit button rendered as bare text, and the Work Experience select
 * collapsed to 21px tall.
 *
 * The repair: an unlayered rule of our own — so it competes with Harvard's on
 * equal footing, and wins on specificity (0,1,1 vs 0,0,1) — that hands each
 * property back to whatever the cascade layers had decided. `revert-layer` is
 * exactly that: "ignore this unlayered origin, use the layered value". It
 * restores the Tailwind utilities without this file having to know any of them.
 *
 * Scoped to `button[data-slot]` — every ShadCN control (button, select-trigger,
 * popover-trigger, dialog-close) — MINUS anything carrying `.o-btn`.
 *
 * That exclusion is not cosmetic. Radix stamps `data-slot` on whatever element
 * it wraps, so the hero's own Harvard button
 *
 *     <button data-slot="dialog-trigger" class="o-btn o-btn--fill o-btn--clear">
 *
 * matched too, and `revert-layer` duly threw away its `.o-btn` padding and
 * height — those live in Harvard's UNLAYERED css, which is exactly what
 * revert-layer discards. It collapsed to a bare 30px box. Any button that opts
 * into Harvard's design system must keep it.
 */
button[data-slot]:not([class*="o-btn"]) {
  background: revert-layer;
  background-color: revert-layer;
  color: revert-layer;
  width: revert-layer;
  height: revert-layer;
  padding: revert-layer;
  border: revert-layer;
  border-radius: revert-layer;
  font: revert-layer;
  line-height: revert-layer;
  text-align: revert-layer;
  overflow: revert-layer;
  -webkit-appearance: revert-layer;
}

/* Harvard brand crimson for ShadCN's primary, matching `primaryColor` in
 * schema.ts / harvard-elp.json. This cohort carries no microsite branding in
 * XITE, so --primary would otherwise fall back to the app's near-black default
 * and the brochure CTA would come out charcoal instead of Harvard red.
 *
 * A cohort that DOES get branding still wins: ColorThemeUpdate sets these as
 * inline styles on the document element, which outrank any stylesheet.
 */
:root {
  --primary: #a51c30;
  --primary-foreground: #ffffff;
}
