/* Yes / No tool (wave 2, spec §5.1). Loaded after wheel.css; reuses its tokens and settings rows.
   Logical properties only (RTL by dir), dark mode through the --lh-* tokens, reduced motion respected. */

/* the question field above the wheel: the wheel shrinks by its height (wheel.css --lh-extra) */
.lh-app[data-ptool="yesno"] { --lh-extra: 66px; }
.lh-yesno-q { width: 100%; }
.lh-yesno-field {
  display: flex; flex-direction: column; justify-content: center; gap: 1px; min-height: 56px; padding: 6px 14px;
  border: 1px solid var(--lh-border-strong); border-radius: 14px; background: var(--lh-surface); cursor: text;
  transition: border-color .12s, box-shadow .12s;
}
.lh-yesno-field:focus-within { border-color: var(--lh-focus); box-shadow: 0 0 0 1px var(--lh-focus); }
.lh-yesno-field__l { color: var(--lh-muted); font-size: .75rem; font-weight: 700; letter-spacing: .02em; line-height: 1.2; }
.lh-yesno-field__in {
  width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--lh-text);
  font-size: 1.0625rem; font-weight: 650; line-height: 1.35; text-overflow: ellipsis;
}
.lh-yesno-field__in:focus { outline: none; }
.lh-yesno-field__in::placeholder { color: var(--lh-muted); opacity: .85; font-weight: 500; }

/* the card: under the wheel on phones, first tab of the side panel on wide screens (JS) */
.lh-yesno-card:not(.is-on) { display: none; }
.lh-yesno-card { display: flex; flex-direction: column; gap: 14px; }
.lh-slot--below > .lh-yesno-card { padding: 14px 16px 6px; border: 1px solid var(--lh-border); border-radius: 16px; background: var(--lh-surface); box-shadow: var(--lh-shadow-sm); }
.lh-yesno-sec { display: flex; flex-direction: column; gap: 6px; }
.lh-yesno-sec + .lh-yesno-sec { padding-block-start: 12px; border-block-start: 1px solid var(--lh-border); }
.lh-yesno-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.lh-yesno-h { margin: 0; color: var(--lh-muted); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
:lang(ar) .lh-yesno-h { letter-spacing: 0; font-size: .875rem; }

.lh-yesno-tally { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.lh-yesno-tile {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 16px; overflow: hidden;
  border-radius: 12px; background: var(--lh-surface-2);
}
.lh-yesno-tile::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 5px; background: var(--c); }
.lh-yesno-tile__l { font-size: .875rem; font-weight: 700; color: var(--lh-muted); }
.lh-yesno-tile__n { font-size: 1.75rem; font-weight: 850; line-height: 1.1; font-variant-numeric: tabular-nums; }
.lh-yesno-card .lh-step .lh-num { width: 52px; min-height: 40px; padding: 0; border-radius: 0; }

/* result dialog: the question as the title (« Dois-je… ? → OUI ») */
.lh-win.lh-yesno-win .lh-win__title {
  max-width: 32ch; color: var(--lh-text); font-size: clamp(1.0625rem, 4vw, 1.375rem); font-weight: 750;
  letter-spacing: 0; text-transform: none; line-height: 1.35; overflow-wrap: anywhere; unicode-bidi: plaintext;
}
.lh-yesno-seq { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0 0; padding: 0; }
.lh-yesno-seq__i { min-width: 44px; padding: 4px 12px; border-radius: 999px; font-size: .875rem; font-weight: 750; background: var(--c); color: var(--i); }

/* phones: the hidden panel tab (the card lives under the wheel) */
@media (max-width: 767.98px) { .lh-app #lh-tab-yesno { display: none; } }
@media (max-height: 500px) and (orientation: landscape) and (max-width: 1023.98px) { .lh-app #lh-tab-yesno { display: none; } }
.lh-classroom .lh-yesno-field__in { font-size: 1.25rem; }
