/* Fonts the user can pick with the font button (files in static/fonts; the Windows ones are used first when the PC has them). */
@font-face { font-family: "LF Segoe UI"; font-weight: 100 900; font-display: swap; src: local("Segoe UI"), url(../fonts/segoe-ui.woff2) format("woff2"); }
@font-face { font-family: "LF Sans Serif"; font-weight: 100 900; font-display: swap; src: url(../fonts/sans-serif.woff2) format("woff2"); }
@font-face { font-family: "LF Gill Sans"; font-weight: 100 900; font-display: swap; src: url(../fonts/gill-sans.woff2) format("woff2"); }
@font-face { font-family: "LF Arial"; font-weight: 100 600; font-display: swap; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica"); }
@font-face { font-family: "LF Arial"; font-weight: 700 900; font-display: swap; src: local("Arial Bold"), local("Arial-BoldMT"), url(../fonts/arial-bold.woff2) format("woff2"); }
@font-face { font-family: "LF Times"; font-weight: 100 900; font-display: swap; src: local("Times New Roman"), url(../fonts/times.woff2) format("woff2"); }
@font-face { font-family: "LF Calibri Bold"; font-weight: 100 900; font-display: swap; src: url(../fonts/calibri-bold.woff2) format("woff2"); }
@font-face { font-family: "LF Calibri Light"; font-weight: 100 900; font-display: swap; src: url(../fonts/calibri-light.woff2) format("woff2"); }
@font-face { font-family: "LF Dubai Bold"; font-weight: 100 900; font-display: swap; src: url(../fonts/dubai-bold.woff2) format("woff2"); }
@font-face { font-family: "LF Andalus"; font-weight: 100 900; font-display: swap; src: url(../fonts/andalus.woff2) format("woff2"); }

html[data-ufont] body, html[data-ufont] body :not(.material-symbols-outlined):not(svg):not(svg *) { font-family: var(--ufont) !important; }
/* sans-serif.woff2 has a very narrow space (0.13em, Arial's is 0.28em): words ran together. */
html[data-ufont][style*="LF Sans Serif"] body, html[data-ufont][style*="LF Sans Serif"] body * { word-spacing: .18em; }

.fp-wrap { position: relative; display: inline-block; }
.fp-btn { width: 36px; height: 36px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  border: 1px solid rgba(127,127,127,.45); background: transparent; color: inherit; }
.fp-btn:hover { border-color: var(--c-primary, #d4af37); color: var(--c-primary, #d4af37); }
.fp-btn .material-symbols-outlined { font-size: 20px; }
.fp-menu { position: absolute; z-index: 200; top: calc(100% + 8px); inset-inline-end: 0; min-width: 220px; padding: 6px; border-radius: 12px; display: none;
  background: var(--c-surface-container-low, #1b1d22); color: var(--c-on-surface, #e2e2e8); border: 1px solid rgba(127,127,127,.4); box-shadow: 0 12px 34px rgba(0,0,0,.4); }
.fp-wrap.open .fp-menu { display: block; }
.fp-menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; text-align: start; padding: 9px 12px; border: 0; border-radius: 8px;
  background: transparent; color: inherit; font-size: 15px; cursor: pointer; }
.fp-menu button:hover { background: rgba(127,127,127,.18); }
.fp-menu button.on { background: rgba(212,175,55,.18); }
.fp-menu button.on::after { content: "\2713"; font-family: sans-serif; }
.fp-menu small { display: block; padding: 4px 12px 6px; font-size: 11px; opacity: .65; font-family: sans-serif; }

/* theme colour picker in the POS drawer (themepick.js): opens upwards, the drawer's preferences sit at the bottom */
.tp-menu { position: absolute; z-index: 200; bottom: calc(100% + 8px); inset-inline-start: 0; width: 250px; max-width: 80vw; padding: 6px; border-radius: 12px; display: none; grid-template-columns: 1fr 1fr; gap: 2px;
  background: var(--c-surface-container-low, #1b1d22); color: var(--c-on-surface, #e2e2e8); border: 1px solid rgba(127,127,127,.4); box-shadow: 0 12px 34px rgba(0,0,0,.4); }
.tp-wrap.open .tp-menu { display: grid; }
.tp-menu button { display: flex; align-items: center; gap: 8px; text-align: start; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 12px; line-height: 1.2; cursor: pointer; }
.tp-menu button:hover { background: rgba(127,127,127,.18); }
.tp-menu button.on { background: rgba(127,127,127,.28); font-weight: 700; }
.tp-menu i { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(127,127,127,.5); }
/* inside the appearance popup the font list opens from the button's own side (it used to open to the left, outside the popup, and was cut off) */
#themeDropdown .fp-menu { inset-inline-start: 0; inset-inline-end: auto; max-height: 170px; overflow-y: auto; }
