/* Uteged numbers widget: calculator, base and script toggles, conversions and number names. */
.num { font: 12px Arial, sans-serif; color: #000; text-align: left; max-width: 760px; margin: 0 auto; }
.num * { box-sizing: border-box; }
.num button { font: 12px Arial, sans-serif; cursor: pointer; }
.num button:disabled { cursor: default; }

/* script fonts: sizes as the dictionary uses them */
.num .num-ani { font-family: "Aninv2"; }
.num .num-aul { font-family: "aul001"; font-size: 1.15em; }
.num .num-lat { font-family: Arial, sans-serif; }
.num .num-det { font-family: "lettergreepschrift"; font-size: 1.5em; line-height: 1.1; }

/* toggles */
.num .num-options { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 6px 0 10px; }
.num .num-toggle { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.num .num-toggle-label { color: #660033; font-weight: bold; margin-right: 4px; }
.num .num-toggle-btn { border: 1px solid #cc9966; background: #fff; color: #800000; padding: 3px 10px; }
.num .num-toggle-btn:hover { background: #ffe8c0; }
.num .num-toggle-btn[aria-pressed="true"] { background: #660033; border-color: #660033; color: #fff; }
.num .num-toggle-btn:disabled { color: #bbb; border-color: #c9a98a; background: #f3e6d6; }

/* calculator */
.num .num-calc { max-width: 360px; margin: 0 auto; border: 1px solid #660000; background: #cc9966; padding: 8px; }
.num .num-display { background: #fff; border: 1px solid #660000; padding: 6px 10px; margin-bottom: 8px; text-align: right; overflow: hidden; }
.num .num-pending { min-height: 1.4em; color: #555; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.num .num-entry { font-size: 30px; line-height: 1.3; min-height: 1.3em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.num .num-entry .num-aul { font-size: 1.1em; }
.num .num-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.num .num-key { position: relative; height: 48px; border: 1px solid #660000; background: #fff; color: #000; font-size: 22px; line-height: 1; padding: 0; }
.num .num-key:hover:not(:disabled) { background: #ffe8c0; }
.num .num-key:active:not(:disabled) { background: #e8c898; }
.num .num-key:disabled { color: #bbb; border-color: #c9a98a; background: #f3e6d6; }
.num .num-key:disabled .num-key-hint { color: #bbb; }
.num .num-key-op { background: #ffe8c0; color: #660033; }
.num .num-key-op:hover:not(:disabled) { background: #ffd89a; }
.num .num-key-wide { grid-column: 1 / -1; }
.num .num-key[data-key="="] { background: #660033; color: #fff; }
.num .num-key[data-key="="]:hover { background: #80204a; }
.num .num-key .num-key-hint { position: absolute; right: 4px; bottom: 2px; font: 10px Arial, sans-serif; color: #800000; }
.num .num-key .num-aul { font-size: 24px; }
.num .num-key .num-det { font-size: 22px; }
.num .num-entry .num-det { font-size: 0.9em; }
.num .num-conv .num-det { font-size: 20px; }
/* the script fonts have hairline stems (no bold face exists): let the browser embolden them on the keys */
.num .num-key .num-ani, .num .num-key .num-aul { font-weight: bold; -webkit-text-stroke: 0.5px currentColor; }

/* conversions and names */
.num table.num-conv { border-collapse: separate; border: 1px solid #660000; width: 100%; margin-top: 12px; }
.num table.num-conv th { background: #cc9966; color: #000; text-align: left; padding: 4px 6px; width: 11em; vertical-align: top; font-weight: bold; white-space: normal; }
.num table.num-conv td { border-top: 1px solid #cc9966; padding: 4px 6px; vertical-align: top; font-size: 14px; word-break: break-all; }
.num table.num-conv tr:nth-child(even) td { background: rgba(255, 255, 255, 0.45); }
.num .num-conv-item { display: inline-block; margin-right: 1.5em; }
.num .num-conv .num-ani, .num .num-conv .num-aul { font-size: 16px; }
.num .num-sentence { margin-top: 2px; }
.num .num-sentence.num-aul { font-size: 16px; }
.num .num-sentence.num-det { font-size: 22px; }

/* the Detbap finger counter (detbap-numbers.js) */
.fingers { font: 12px Arial, sans-serif; color: #000; max-width: 360px; margin: 0 auto; border: 1px solid #660000; background: #cc9966; padding: 8px; }
.fingers * { box-sizing: border-box; }
.fingers .fingers-row { display: flex; align-items: center; gap: 8px; }
.fingers .fingers-step { width: 48px; height: 48px; border: 1px solid #660000; background: #ffe8c0; color: #660033; font: 26px Arial, sans-serif; line-height: 1; cursor: pointer; }
.fingers .fingers-step:hover:not(:disabled) { background: #ffd89a; }
.fingers .fingers-step:disabled { color: #bbb; border-color: #c9a98a; background: #f3e6d6; cursor: default; }
.fingers .fingers-display { flex: 1; background: #fff; border: 1px solid #660000; padding: 6px 10px; text-align: center; }
.fingers .fingers-value { font-size: 30px; line-height: 1.2; }
.fingers .fingers-word { font-size: 16px; margin-top: 2px; }
.fingers .fingers-glyphs { font-family: "lettergreepschrift"; font-size: 30px; line-height: 1.1; min-height: 1.1em; }
.fingers .fingers-hands { display: flex; justify-content: center; gap: 24px; margin: 8px 0 4px; }
.fingers .fingers-hand { text-align: center; }
.fingers .fingers-hand-label { color: #660033; font-weight: bold; margin-bottom: 2px; }
.fingers .fingers-finger { display: inline-block; width: 10px; height: 26px; margin: 0 2px; border: 1px solid #660000; border-radius: 5px 5px 2px 2px; background: #fff; vertical-align: bottom; }
.fingers .fingers-finger.up { background: #660033; height: 34px; }
.fingers .fingers-how { background: #fff; border: 1px solid #660000; padding: 4px 8px; margin-top: 6px; }
.fingers .fingers-modern { margin-top: 6px; }
.fingers .fingers-modern .num-det { font-family: "lettergreepschrift"; font-size: 22px; line-height: 1.1; }
.fingers .fingers-muted { color: #555; font-style: italic; }
.num .num-muted { color: #555; font-style: italic; }
.num .num-hint { color: #555; margin: 8px 0; }

@media (max-width: 420px) {
  .num table.num-conv th { width: 7em; }
  .num .num-entry { font-size: 24px; }
}
