/*
 * QRM base reset: the element defaults every screen relies on.
 *
 * Loaded right after variables.css and before components/base.css (public/styles.css
 * and views/patient-portal/patient-app.ejs). Plain element selectors on purpose: they
 * beat the `*` zeroing in base.css, and base.css or a screen sheet still wins over
 * them later in the cascade. Logical properties (inline-start) so one file serves
 * left-to-right and right-to-left languages.
 *
 * Only rules a screen measurably depends on are here. base.css already owns the body
 * font, color, background, line-height, smooth scrolling and the h1-h4 sizes.
 */

/* Pseudo-elements size like their element (base.css `*` misses ::before/::after). */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Native controls (date picker, select, checkbox) draw in the theme's light or
   dark: variables.css sets --color-scheme per theme. */
html {
  color-scheme: var(--color-scheme);
}

/* iOS: no text inflation on rotate, no gray flash on every tap. */
body {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* A thin rule in the current text color, not the browser's inset gray bevel. */
hr {
  margin: 1rem 0;
  color: inherit;
  border: 0;
  border-top: 1px solid;
  opacity: 0.25;
}

/* Headings: tight line-height and no top margin. h5/h6 sizes live here because
   base.css sizes only h1-h4. */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}

h5 { font-size: var(--font-size-2xl); }
h6 { font-size: var(--font-size-lg); }

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

abbr[title] {
  text-decoration: underline dotted;
  text-decoration-skip-ink: none;
  cursor: help;
}

address {
  margin-bottom: 1rem;
  font-style: normal;
  line-height: inherit;
}

/* Lists keep their indent and bottom gap; nested lists do not double the gap. */
ol, ul {
  padding-inline-start: 2rem;
}

ol, ul, dl {
  margin-top: 0;
  margin-bottom: 1rem;
}

ol ol, ul ul, ol ul, ul ol {
  margin-bottom: 0;
}

dt { font-weight: 700; }

dd {
  margin-bottom: 0.5rem;
  margin-inline-start: 0;
}

blockquote, figure {
  margin: 0 0 1rem;
}

b, strong { font-weight: bolder; }

small { font-size: 0.875em; }

mark {
  padding: 0.1875em;
  background-color: var(--color-mark-bg, #fff3cd);
}

/* sub/sup do not stretch the line they sit in. */
sub, sup {
  position: relative;
  font-size: 0.75em;
  line-height: 0;
  vertical-align: baseline;
}

sub { bottom: -0.25em; }
sup { top: -0.5em; }

/* An anchor with no href and no class (often role="button") is not a link. */
a:not([href]):not([class]),
a:not([href]):not([class]):hover {
  color: inherit;
  text-decoration: none;
}

/* Code and key caps: one monospace stack, slightly smaller than the text. */
code, kbd, pre, samp {
  font-family: var(--font-mono, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
  font-size: 1em;
}

pre {
  display: block;
  margin-top: 0;
  margin-bottom: 1rem;
  overflow: auto;
  font-size: 0.875em;
}

pre code {
  font-size: inherit;
  color: inherit;
  word-break: normal;
}

/* Inline code is neutral text (owner, 2026-11-03), not a pink accent. */
code {
  font-size: 0.875em;
  color: var(--text-primary);
  word-wrap: break-word;
}

a > code { color: inherit; }

kbd {
  padding: 0.1875rem 0.375rem;
  font-size: 0.875em;
  color: var(--bg-primary);
  background-color: var(--text-primary);
  border-radius: 0.25rem;
}

kbd kbd {
  padding: 0;
  font-size: 1em;
}

/* Icons (every lucide svg in a button) sit on the text's middle, not its baseline. */
img, svg {
  vertical-align: middle;
}

/* Tables: collapsed borders, caption under the table, headers aligned like their
   column, no cell borders until a table style adds them. */
table {
  caption-side: bottom;
  border-collapse: collapse;
}

caption {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  color: var(--text-secondary);
  text-align: start;
}

th {
  text-align: inherit;
  text-align: -webkit-match-parent;
}

thead, tbody, tfoot, tr, td, th {
  border-color: inherit;
  border-style: solid;
  border-width: 0;
}

/* A label takes margin-bottom (form groups space their label with it). */
label { display: inline-block; }

/* Form controls: the page font, no stray margin, no mouse-click focus ring on
   plain buttons (keyboard focus still shows). */
button { border-radius: 0; }

button:focus:not(:focus-visible) { outline: 0; }

input, button, select, optgroup, textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button, select { text-transform: none; }

[role="button"] { cursor: pointer; }

select { word-wrap: normal; }

select:disabled { opacity: 1; }

/* A datalist field shows no calendar-style picker arrow. */
[list]:not([type="date"]):not([type="datetime-local"]):not([type="month"]):not([type="week"]):not([type="time"])::-webkit-calendar-picker-indicator {
  display: none !important; /* important: beats the browser's own picker style; remove when browsers drop the indicator on datalist fields */
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
  cursor: pointer;
}

::-moz-focus-inner {
  padding: 0;
  border-style: none;
}

textarea { resize: vertical; }

/* A fieldset is a plain group, not a grooved box. */
fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

legend {
  float: inline-start;
  width: 100%;
  padding: 0;
  margin-bottom: 0.5rem;
  font-size: calc(1.275rem + 0.3vw);
  line-height: inherit;
}

@media (min-width: 1200px) {
  legend { font-size: var(--font-size-3xl); }
}

legend + * { clear: inline-start; }

/* Native date, number, search, color and file widgets: no extra inner padding or
   chrome, and the file button uses the page font. */
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
  padding: 0;
}

::-webkit-inner-spin-button { height: auto; }

[type="search"] {
  outline-offset: -2px;
  -webkit-appearance: textfield;
}

::-webkit-search-decoration { -webkit-appearance: none; }

::-webkit-color-swatch-wrapper { padding: 0; }

::-webkit-file-upload-button {
  font: inherit;
  -webkit-appearance: button;
}

::file-selector-button {
  font: inherit;
  -webkit-appearance: button;
}

output { display: inline-block; }

iframe { border: 0; }

summary {
  display: list-item;
  cursor: pointer;
}

progress { vertical-align: baseline; }

/* `hidden` always hides, even on an element whose class sets display. */
[hidden] {
  display: none !important; /* important: the hidden attribute must beat every class display rule; remove when no stylesheet sets display on a hidden element */
}
