/* Mini-preflight: Lovable markup računa na Tailwind preflight, ki ga tukaj nimamo (corePlugins.preflight = false,
   ker bi globalno razbil Elementor). Zato Tailwindov preflight posnemamo znotraj gradnikov (.ge-w).
   :where() drži specifičnost na 0,1,0 (kot utility); ker se naloži PRED tw.css, utility vedno zmaga.
   Vrstni red in vsebina sledita tailwindcss/src/css/preflight.css (v3.4). */

.ge-w, .ge-w :where(*, *::before, *::after) {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: hsl(var(--ge-border));
}

.ge-w :where(hr) { height: 0; color: inherit; border-top-width: 1px; }
.ge-w :where(abbr[title]) { text-decoration: underline dotted; }
.ge-w :where(h1, h2, h3, h4, h5, h6) { font-size: inherit; font-weight: inherit; }
.ge-w :where(a) { color: inherit; text-decoration: inherit; }
.ge-w :where(b, strong) { font-weight: bolder; }
.ge-w :where(code, kbd, samp, pre) { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 1em; }
.ge-w :where(small) { font-size: 80%; }
.ge-w :where(sub, sup) { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
.ge-w :where(sub) { bottom: -0.25em; }
.ge-w :where(sup) { top: -0.5em; }
.ge-w :where(table) { text-indent: 0; border-color: inherit; border-collapse: collapse; }

.ge-w :where(button, input, optgroup, select, textarea) {
  font-family: inherit; font-feature-settings: inherit; font-variation-settings: inherit;
  font-size: 100%; font-weight: inherit; line-height: inherit; letter-spacing: inherit;
  color: inherit; margin: 0; padding: 0;
}
.ge-w :where(button, select) { text-transform: none; }
.ge-w :where(button, input:where([type="button"], [type="reset"], [type="submit"])) {
  -webkit-appearance: button; background-color: transparent; background-image: none;
}
/* white-space: normal razveljavi Hello Elementor reset (button { white-space: nowrap }). */
.ge-w :where(button) { white-space: normal; }
.ge-w :where(:-moz-focusring) { outline: auto; }
.ge-w :where(:-moz-ui-invalid) { box-shadow: none; }
.ge-w :where(progress) { vertical-align: baseline; }
.ge-w :where(::-webkit-inner-spin-button, ::-webkit-outer-spin-button) { height: auto; }
.ge-w :where([type="search"]) { -webkit-appearance: textfield; outline-offset: -2px; }
.ge-w :where(::-webkit-search-decoration) { -webkit-appearance: none; }
.ge-w :where(::-webkit-file-upload-button) { -webkit-appearance: button; font: inherit; }
.ge-w :where(summary) { display: list-item; }

.ge-w :where(blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre) { margin: 0; }
.ge-w :where(fieldset) { margin: 0; padding: 0; }
.ge-w :where(legend) { padding: 0; }
.ge-w :where(ol, ul, menu) { list-style: none; margin: 0; padding: 0; }
.ge-w :where(dialog) { padding: 0; }
.ge-w :where(textarea) { resize: vertical; }
.ge-w :where(input::placeholder, textarea::placeholder) { opacity: 1; color: #9ca3af; }
.ge-w :where(button, [role="button"]) { cursor: pointer; }
.ge-w :where(:disabled) { cursor: default; }

/* Kot Tailwind preflight: max-width/height samo za img in video, NE za svg (sicer flex stisne ikone na 0). */
.ge-w :where(img, svg, video, canvas, audio, iframe, embed, object) { display: block; vertical-align: middle; }
.ge-w :where(img, video) { max-width: 100%; height: auto; }
.ge-w :where([hidden]) { display: none; }

/*
 * Vrstična višina naslovov.
 *
 * base.css naslovom nastavi `line-height: 1.1` – Lovable tega ne počne, tam nastavi samo
 * pisavo. Tailwindov preflight naslovom pobriše `font-weight` in `margin`, vrstične višine
 * pa ne, zato je prav ta ena lastnost tiho pronicala v vso vsebino gradnikov.
 *
 * Posledica je bila komaj vidna in zato nevarna: naslov brez razreda za velikost (npr. <h4>
 * v kartici) je podedoval 1,1 namesto vrstične višine starša. Na strani Naša zgodba je bila
 * vsaka kartica vrednot zato 8 px nižja od Lovable.
 *
 * Znotraj gradnikov torej vrnemo dedovanje; naslovi z razredom `leading-*` ali `text-*`
 * imajo večjo težo in ostanejo nedotaknjeni.
 */
.ge-w :where(h1, h2, h3, h4, h5, h6) {
  line-height: inherit;
}
