/* My Own Fitness — stiluri de bază pentru tot site-ul (inclusiv blog, pagini legale, WooCommerce, Tutor).
   Se încarcă după tokens.css și înainte de components.css. Selectorii din :where() au specificitate 0,
   ca stilurile pluginurilor și widgeturile Elementor să câștige mereu. Fiecare valoare vine din tokens.css. */

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--mof-surface); color: var(--mof-ink-body); font-family: var(--mof-font-text); font-size: 18px; line-height: 30px; overflow-wrap: break-word; }
/* Fără scroll orizontal pe telefon, ca în tema veche (tooltip-urile ascunse din Tutor LMS ies din ecran).
   Pe body, overflow trece la fereastră, deci position: sticky funcționează în continuare. */
body { overflow-x: hidden; }
:where(*, *::before, *::after) { box-sizing: border-box; }

/* Titluri: scara din tokens (h1 40, h2 32, h3 22) */
:where(h1, h2, h3, h4, h5, h6) { margin: 0 0 var(--mof-space-4); font-family: var(--mof-font-display); color: var(--mof-ink); text-wrap: balance; }
:where(h1) { font-size: 40px; line-height: 48px; font-weight: 700; }
:where(h2) { font-size: 32px; line-height: 40px; font-weight: 600; }
:where(h3) { font-size: 22px; line-height: 30px; font-weight: 600; }
:where(h4, h5, h6) { font-size: 18px; line-height: 30px; font-weight: 600; }

:where(p, ul, ol, dl, blockquote, figure, table, pre) { margin: 0 0 var(--mof-space-4); }
:where(strong, b) { font-weight: 600; color: var(--mof-ink); }
:where(small) { font-size: 15px; line-height: 22px; }
:where(img, video, iframe) { max-width: 100%; }
:where(img, video) { height: auto; }
:where(hr) { border: 0; border-top: 1px solid var(--mof-line); margin: var(--mof-space-6) 0; }

/* Linkuri: în text rămân subliniate */
:where(a) { color: var(--mof-link); text-underline-offset: 3px; }
:where(a:hover) { text-decoration-thickness: 2px; }

/* Focus vizibil peste tot */
:where(:focus-visible) { outline: 2px solid var(--mof-focus-ring); outline-offset: 2px; }

/* Formulare: același aspect ca mof-input, cu etichete vizibile */
:where(label) { font-size: 15px; line-height: 22px; font-weight: 500; color: var(--mof-ink); }
:where(input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"], [type="reset"], [type="file"], [type="image"], [type="hidden"], [type="range"], [type="color"]), select, textarea) { max-width: 100%; min-height: 52px; padding: 0 var(--mof-space-4); border: 1px solid var(--mof-ink-muted); border-radius: var(--mof-radius-sm); background: var(--mof-surface); color: var(--mof-ink); font: inherit; font-size: 17px; }
:where(textarea) { min-height: 140px; padding: var(--mof-space-3) var(--mof-space-4); line-height: 26px; }
:where(input[type="checkbox"], input[type="radio"]) { width: 20px; height: 20px; accent-color: var(--mof-ink); }
:where(::placeholder) { color: var(--mof-ink-muted); opacity: 1; }

/* Butoane fără clasă proprie: pastilă cu contur, ca mof-btn--outline (pluginurile își păstrează stilurile lor) */
:where(button, input[type="submit"], input[type="button"], input[type="reset"]) { min-height: 44px; padding: 0 var(--mof-space-5); border: 2px solid var(--mof-ink); border-radius: var(--mof-radius-pill); background: transparent; color: var(--mof-ink); font-family: var(--mof-font-display); font-size: 16px; line-height: 24px; font-weight: 600; cursor: pointer; }

/* Text doar pentru cititoarele de ecran (clasa standard WordPress) */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.screen-reader-text:focus { clip: auto !important; clip-path: none; height: auto; width: auto; margin: 0; left: var(--mof-space-4); top: var(--mof-space-4); z-index: 100000; padding: var(--mof-space-3) var(--mof-space-5); background: var(--mof-surface); color: var(--mof-ink); border-radius: var(--mof-radius-pill); font-family: var(--mof-font-display); font-weight: 600; font-size: 16px; line-height: 24px; text-decoration: none; box-shadow: var(--mof-shadow-card); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
