/* polish-openings.css (owner: C152) - Openings tab launch polish. Brand tokens only (brand/tokens.css, css/skin.css). */

/* Chess moves inside CAPS headings keep their real notation: "AFTER YOUR 1.e4", not "1.E4" (js/polish-openings.js wraps them) */
#panel-openings .op-san { text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }

/* Wrong move in a drill: the reason in chess terms, under "d5 is not the move we are training here..." */
#panel-openings .op-whywrong {
  margin-top: 6px; padding-top: 6px; border-top: 1px dashed color-mix(in srgb, currentColor 28%, transparent);
  font-weight: 600; font-size: .94em; line-height: 1.4;
}
@media (prefers-reduced-motion: no-preference) {
  #panel-openings .op-whywrong { animation: op-why-in .22s ease-out both; }
  @keyframes op-why-in { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
}

/* Weakest openings: a small sample is flagged, never hidden ("only 4 games so far") */
#panel-openings .op-few {
  display: inline-block; padding: 0 7px; border-radius: 999px; line-height: 1.55;
  font-size: .9em; font-weight: 700; white-space: nowrap;
  color: var(--warn-text, var(--text-2));
  background: color-mix(in srgb, var(--warn, #d9a441) 16%, transparent);
}

/* The end-of-line buttons (Retry / Next line) wrap instead of running past the card edge in the side column */
/* (.op-ctl is a 3-column grid; on the end card it holds 2-3 buttons whose labels did not fit a third of the side column) */
#panel-openings .op-panel .op-done .op-ctl { display: flex; flex-wrap: wrap; gap: 8px; }
#panel-openings .op-panel .op-done .op-ctl > * { flex: 1 1 auto; width: auto; min-width: max-content; }

/* C187: the small "i" help buttons (js/tab-openings.js .op-i) were a 22x22 box, under the 24px minimum (44px recommended on touch).
   The button itself is now 44x44 so every tool measures a real target; the visible 22px ring is drawn by ::before, and negative
   margins give the extra 11px back so layout does not move (inline margin-left stays 4px from the old ring edge). */
#panel-openings .op-i {
  box-sizing: border-box; width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  margin: -11px -11px -11px -7px; padding: 0; border: 0; background: none;
  border-radius: 50%; position: relative; -webkit-tap-highlight-color: transparent;
}
#panel-openings .op-i::before {
  content: ""; position: absolute; inset: 11px; border: 1.5px solid currentColor; border-radius: 50%; pointer-events: none;
}
#panel-openings .op-i:focus-visible { outline: none; }
#panel-openings .op-i:focus-visible::before { outline: 2px solid var(--tab-accent); outline-offset: 2px; }
