/*
 * Undo Tailwind's "preflight" reset for the Bexon template pages.
 *
 * The portal (client/learner/admin screens) is built on Tailwind, whose global reset zeroes
 * margins/padding/borders, removes list bullets, makes every <img>/<svg> display:block and
 * restyles form controls. The live Flourish Training site has no such reset (Bootstrap's
 * reboot + the template's own CSS sit directly on browser defaults), so the template markup
 * only looks right when those defaults are restored.
 *
 * Every selector is wrapped in :where() => zero specificity, and this file is loaded BEFORE
 * bootstrap/main.css, so anything the template (or Bootstrap) declares still wins; `revert`
 * only takes effect where they declare nothing, handing the property back to the browser's
 * default stylesheet — exactly what the live site renders.
 *
 * This stylesheet is only linked from the marketing layout; portal pages never load it.
 */

:where(*) {
  margin: revert;
  padding: revert;
  border: revert;
}

:where(*)::before,
:where(*)::after {
  border: revert;
}

:where(ol, ul, menu) {
  list-style: revert;
}

:where(img, svg, video, canvas, audio, iframe, embed, object) {
  display: revert;
  vertical-align: revert;
}

:where(summary) {
  display: revert;
}

:where(textarea) {
  resize: revert;
}

:where(button, input, select, optgroup, textarea) {
  font: revert;
  letter-spacing: revert;
  color: revert;
  background-color: revert;
  border-radius: revert;
  opacity: revert;
}

/*
 * Tailwind utility/component classes that share a name with Bootstrap/template classes and set a
 * property the template never sets (found by scanning every public route against the served
 * Tailwind CSS). Anything the template declares itself still wins; only the Tailwind-only
 * property is neutralised.
 */

/* Tailwind's `.collapse` is `visibility: collapse`; Bootstrap's accordion/collapse needs visible. */
:where(.collapse) {
  visibility: visible;
}

/* Bootstrap grid column, not a CSS-grid column index. */
:where(.col-12) {
  grid-column: auto;
}

/* The root <body> carries the portal's `bg-page min-h-screen` classes (position/isolation/min-height). */
:where(body) {
  position: static;
  isolation: auto;
  min-height: 0;
}
