/* USMLE Explained phone + large-text fixes (20 Nov 2026). Layout only, no copy. Undo: remove this file's enqueue. */

/* 1. iPhone zooms the whole page when a box under 16px gets focus: shop "Sort by" menu at 16px on phones */
@media (max-width: 749px) {
  html .woocommerce-ordering select.orderby { font-size: 16px; }
}

/* 2. Shop / category lists: with bigger phone text a long subject word ("Lymphoreticular") ran out of its card and was
      cut. When the list is narrower than 17.5 letters (only with bigger text on a phone) the cards go one per row so
      every name fits; at normal text size the two-per-row grid is unchanged. Any word still too long breaks in the card */
html body.ue-l4 main.site-main { container-type: inline-size; }
@container (max-width: 17.5em) {
  html body.ue-l4 main.site-main > ul.products { grid-template-columns: minmax(0, 1fr); }
}
html ul.products .woocommerce-loop-product__title { overflow-wrap: break-word; }

/* 3. Bundle boxes "You save US$35 (US$8.17 per subject)" were cut at the box edge with bigger text; they wrap instead
      (home plan cards only on phones, so the desktop plan row keeps its one-line look) */
html body.ue-l4 .l4-buybox__head .l4-save { white-space: normal; }
@media (max-width: 749px) {
  html body.ue-l4 .l4-plan__buy .l4-save { white-space: normal; }
}

/* 4. Bundle subject lists and the support email in product descriptions: cut at the edge with bigger text; they wrap */
html body.ue-l4 .entry-content .l4-wf-bl__col a.l4-nowrap { white-space: normal; }
@media (max-width: 749px) {
  html body.ue-l4 .entry-content .l4-wf-bl__grid { grid-template-columns: minmax(0, 1fr); }
}
html body.ue-l4.single-product .woocommerce-Tabs-panel--description a.l4-nowrap { white-space: normal; overflow-wrap: anywhere; }

/* 5. Home PDF preview: section number "04" split into "0" over "4", and "Valvular and flow abnormalities" took
      two lines on 360 px phones; number stays whole and the title fits on one line */
html .ue-l4 .l4-pdf-sec .l4-num { flex: none; white-space: nowrap; }
@media (max-width: 380px) {
  html .ue-l4 .l4-sheet--crop .l4-pdf { padding-left: 14px; padding-right: 14px; }
  html .ue-l4 .l4-page .l4-sheet--crop .l4-pdf-sec { padding-left: 10px; padding-right: 10px; font-size: 1.0075em; }
}

/* 4b. Home "Open the Guideline Change Tracker" button ran past its box with bigger text; it wraps instead (only when the
      button row is under 16 letters wide, so at normal text size it stays on one line) */
html body.ue-l4 #check .l4-wf-why__btns { container-type: inline-size; }
@container (max-width: 16em) {
  html body.ue-l4 #check .l4-wf-why__btns .l4-btn { max-width: 100%; white-space: normal; text-wrap: balance; }
}

/* 6. Step pages: "3 subjects" next to a group name broke onto two lines on 360 px phones */
html .ue-l4 .l4-group__head span { flex: none; white-space: nowrap; }

/* 7. Step pages: "Free Step 2 CK practice questions" took two lines by a few pixels on phones */
@media (max-width: 480px) {
  html body.ue-l4 .ue-onebox__t b { font-size: 18.4px; }
}

/* 8. Calculator tabs "Diagnostic test" / "Risk, OR and NNT" wrapped on 360 px phones: a little less side padding */
@media (max-width: 400px) {
  html .uet-tabs [role="tab"] { padding-left: 8px; padding-right: 8px; }
}

/* 9. Calculator fields on 360 px phones: labels such as "Atmospheric pressure optional" broke into two lines in the
      two-column grid; below 375 px the fields stack one per row */
@media (max-width: 374px) {
  html .uet-fields { grid-template-columns: 1fr; }
}

/* 10. Contact page "Email support@usmleexplained.com" button broke onto two lines on 360 px phones */
@media (max-width: 374px) {
  html .ux-contact .ux-actions .ux-btn { padding-left: 14px; padding-right: 14px; }
}
