/* 🖊️ Whiteboard (js/whiteboard.js): όλη η οθόνη για τον πίνακα· μεγάλα κουμπιά, για δάχτυλο και γραφίδα */
html.wb-on #coach, html.wb-on #foot { display: none; }
html.wb-on #stage { margin: 4px 8px 8px; border-radius: 14px; }
html.wb-fs #topbar { display: none; }
html.wb-fs #stage { margin: 0; border-radius: 0; }

.wb { position: absolute; inset: 0; display: grid; grid-template: auto minmax(0, 1fr) auto / 74px minmax(0, 1fr); background: #eceff1; color: #263238; user-select: none; }
.wb .hidden { display: none !important; }
.wb-top, .wb-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 5px 8px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.14); z-index: 3; }
.wb-top { grid-column: 1 / 3; }
.wb-bottom { grid-column: 2; justify-content: space-between; padding: 3px 8px; box-shadow: 0 -1px 4px rgba(0,0,0,.12); }
.wb-group { display: flex; align-items: center; gap: 3px; }
.wb-spacer { flex: 1; }
.wb-status { font-size: 13px; font-weight: 700; color: #bf360c; min-width: 0; }
.wb-pageno { min-width: 50px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }

.wb-btn { min-width: 40px; height: 40px; padding: 0 6px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; font-size: 19px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.wb-btn:hover:not(:disabled) { background: #e8eaf6; }
.wb-btn.on { background: #c5cae9; box-shadow: inset 0 0 0 2px #3949ab; }
.wb-btn:disabled { opacity: .3; cursor: default; }
.wb-btn.wide { font-size: 14px; font-weight: 700; padding: 0 10px; white-space: nowrap; }
.wb-col { width: 28px; height: 28px; flex: none; padding: 0; border-radius: 50%; border: 2px solid rgba(0,0,0,.22); cursor: pointer; }
.wb-col.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #3949ab; }
.wb-custom { position: relative; overflow: hidden; background: conic-gradient(#e53935, #fdd835, #43a047, #1e88e5, #8e24aa, #e53935); }
.wb-custom input { position: absolute; inset: -6px; width: 44px; height: 44px; opacity: 0; cursor: pointer; }
.wb-w { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.wb-w i { display: block; border-radius: 50%; background: #263238; }
.wb-w:hover { background: #e8eaf6; }
.wb-w.on { background: #c5cae9; box-shadow: inset 0 0 0 2px #3949ab; }

.wb-side { grid-row: 2 / 4; display: flex; flex-direction: column; align-items: stretch; gap: 1px; padding: 3px; background: #fff; box-shadow: 1px 0 4px rgba(0,0,0,.12); overflow-y: auto; z-index: 2; }
.wb-tool { flex: none; height: 46px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.wb-tool span { font-size: 20px; line-height: 1.1; }
.wb-tool small { font-size: 10.5px; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.wb-tool:hover { background: #e8eaf6; }
.wb-tool.on { background: #c5cae9; box-shadow: inset 0 0 0 2px #3949ab; }
.wb-sep { flex: none; height: 1px; margin: 2px 6px; background: #cfd8dc; }

.wb-board { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.wb-board canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.wb-board[data-tool="select"] canvas { cursor: default; }
.wb-board[data-tool="pan"] canvas, .wb-board.grab canvas { cursor: grab; }
.wb-board.grabbing canvas { cursor: grabbing; }
.wb-board[data-tool="eraser"] canvas { cursor: none; }
.wb-board[data-tool="text"] canvas { cursor: text; }
#wb-ta { position: absolute; margin: 0; padding: 0; border: 0; outline: 2px dashed #3949ab; outline-offset: 3px; background: transparent; resize: none; overflow: hidden; white-space: pre; z-index: 2; }
.wb-toast { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: max-content; max-width: 90%; padding: 8px 18px; border-radius: 14px; background: rgba(38,50,56,.93); color: #fff; font-size: 15px; font-weight: 700; pointer-events: none; z-index: 3; }

.wb-fly { position: absolute; z-index: 6; background: #fff; border-radius: 14px; box-shadow: 0 6px 22px rgba(0,0,0,.3); padding: 8px; }
#wb-flyshapes { left: 80px; top: 190px; display: grid; grid-template-columns: repeat(4, 44px); gap: 3px; }
#wb-flyshapes .wb-btn { width: 44px; height: 42px; }
.wb-flybg { right: 90px; top: 56px; width: 330px; display: flex; flex-direction: column; gap: 6px; }
.wb-bgs, .wb-pats { display: flex; flex-wrap: wrap; gap: 6px; }
.wb-bgc { width: 50px; height: 38px; border: 2px solid rgba(0,0,0,.25); border-radius: 9px; cursor: pointer; }
.wb-bgc.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #3949ab; }
.wb .it-gallery { position: absolute; left: 82px; top: 56px; bottom: 56px; width: min(620px, 72%); max-height: none; z-index: 6; overflow: auto; }

/* Στενή οθόνη: η μπάρα κρατά πάντα δύο σειρές, για να μη «πηδά» ο πίνακας όταν αλλάζουν οι επιλογές του εργαλείου */
@media (max-width: 1180px) { .wb-top { min-height: 96px; align-content: flex-start; } }
@media (max-height: 640px) {
  .wb-top { min-height: 0; }
  .wb-tool { height: 34px; }
  .wb-tool small { display: none; }
  .wb-btn { min-width: 34px; height: 34px; font-size: 17px; }
  .wb-w { width: 32px; height: 32px; }
}
@media (max-height: 640px) and (max-width: 1180px) { .wb-top { min-height: 84px; } }
@media (max-width: 760px) {
  .wb { grid-template-columns: 56px minmax(0, 1fr); }
  .wb-tool small { display: none; }
  .wb-col { width: 24px; height: 24px; }
  .wb-flybg { right: 8px; width: min(330px, 90%); }
}
