/* the board (Pano): croqi's studios chained on one pasteboard, direction A "Serbest masa". Same Atölye
   grammar as the part screen: graphite chrome, the drawing on white paper, one steel accent. Correction red
   is the note pins' own and is not used here. Classes are .wb-* because .board belongs to the library
   (board.css). Values come from app.css tokens only (--wb-* for the board's own). */

.wb { position: relative; height: 100%; overflow: clip; background-color: var(--paste); cursor: default; user-select: none; }
.wb[hidden] { display: none; }
.wb-dots { background-image: radial-gradient(circle, var(--wb-dot) 1px, transparent 1px); background-size: 24px 24px; }
.wb.is-pan { cursor: grab; }
.wb.is-panning, .wb.is-dragging { cursor: grabbing; }
.wb[aria-busy="true"] .wb-world { opacity: .6; }
.wb-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.wb-wires { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.wb-wire { fill: none; stroke: var(--wb-wire); stroke-width: 1.5; }
.wb-wire.is-lit { stroke: var(--wb-wire-lit); stroke-width: 2; }
.wb-wire.is-revision { stroke-dasharray: 5 4; }
.wb-port { fill: var(--paste); stroke: var(--accent); stroke-width: 1.5; }

/* a node: its name above its top-left corner, as Illustrator names an artboard; far from the screen its
   body is not drawn (the size it had is kept, so the wires and the layout do not move) */
.wb-node { position: absolute; outline: none; }
.wb-node.is-far { content-visibility: hidden; }
.wb-item { position: relative; }
.wb-name {
  position: absolute; left: 0; bottom: calc(100% + 8px); display: flex; align-items: baseline; gap: 8px; max-width: 100%;
  color: var(--ink-muted); font-size: var(--t-body); white-space: nowrap;
}
/* the part's name reads first and is renamed with a double click (js/board.js renamePart) */
.wb-name b { overflow: hidden; color: var(--ink); font-weight: 700; text-overflow: ellipsis; cursor: text; }
.wb-name .mono, .wb-name .wb-meta { font-size: var(--t-meta); color: var(--ink-muted); }
.wb-name .wb-meta { font-family: var(--font-meta); }
.wb-name .wb-v { color: var(--accent); }
.wb-node.is-selected .wb-body, .wb-node:focus-visible .wb-body { outline: 2px solid var(--wb-select); outline-offset: 4px; }

/* results: paper for drawings, the picture itself for photographs */
.wb-paper { display: grid; margin: 0; background: var(--wb-paper); box-shadow: var(--wb-node-shadow); }
.wb-views { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: center; gap: 12px; min-height: 120px; padding: 20px 20px 12px; }
.wb-views svg { display: block; width: 100%; height: auto; }
.wb-missing { margin: 0; color: var(--wb-paper-muted); font-size: var(--t-meta); text-align: center; }
.wb-tb { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-top: 1px solid var(--wb-paper-line); color: var(--wb-paper-ink); }
.wb-tb div { min-width: 0; padding: 4px 8px; border-left: 1px solid var(--wb-paper-line); }
.wb-tb div:first-child { border-left: 0; }
.wb-tb span { display: block; color: var(--wb-paper-muted); font: var(--label-weight) var(--t-label) var(--font-label); letter-spacing: var(--label-track); text-transform: uppercase; font-variation-settings: var(--label-vary); }
.wb-tb strong { display: block; overflow: hidden; font-size: var(--t-meta); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.wb-photo { position: relative; display: block; margin: 0; overflow: hidden; background: var(--frame); box-shadow: var(--wb-node-shadow); }
.wb-photo img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.wb-trim img { object-fit: contain; background: var(--wb-paper); }
.wb-whole img { object-fit: contain; background: var(--wb-paper); }
.wb-play {
  position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px 0 4px;
  border-radius: 99px; background: var(--pop); color: var(--ink); font: 500 var(--t-label) var(--font-meta);
}
.wb-slot { display: grid; place-items: center; border: 1.5px dashed var(--line-strong); background: var(--wash); }
.wb-waiting > span { padding: 0 12px; color: var(--ink-muted); font: 500 var(--t-meta) var(--font-meta); text-align: center; }
/* a result being made: what, the step, how long, and a line that keeps moving (js/board-make.js tick) */
.wb-wait { display: grid; justify-items: center; gap: 6px; width: 100%; padding: 0 16px; text-align: center; }
.wb-wait b { color: var(--ink); font-size: var(--t-body); font-weight: 500; }
.wb-wait-step { min-height: 1em; color: var(--ink-muted); font-size: var(--t-meta); }
.wb-wait-step:empty { display: none; }
.wb-wait-time { color: var(--ink-muted); font-size: var(--t-label); }
.wb-wait-line { position: relative; width: min(160px, 80%); height: 2px; margin-top: 4px; overflow: hidden; border-radius: 2px; background: var(--line-strong); }
.wb-wait-line::after { content: ''; position: absolute; inset: 0; width: 40%; border-radius: 2px; background: var(--accent); }
/* a result that just landed glows once */
.wb-node.is-new .wb-body { outline: 2px solid var(--accent); outline-offset: 4px; }
.wb-arrow { fill: var(--wb-wire); }
.wb-arrow.is-lit { fill: var(--wb-wire-lit); }

/* the render prompt card: it takes the bar's place over the selected drawing (Buket, 13 November) */
.wb-context.wb-render { flex-direction: column; align-items: stretch; gap: 8px; width: 340px; padding: 12px; white-space: normal; }
.wb-render-title { margin: 0; overflow: hidden; color: var(--ink-muted); font: 500 var(--t-label) var(--font-meta); text-overflow: ellipsis; white-space: nowrap; }
.wb-render-label { font-size: var(--t-body); font-weight: 700; }
.wb-render textarea { min-height: 72px; font-size: var(--t-body); }
.wb-render-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.wb-render-hint { margin-right: auto; color: var(--ink-muted); font-size: var(--t-meta); }
.wb-context.wb-render .wb-render-actions button { height: 32px; padding: 0 14px; }
.wb-context.wb-render .btn-primary, .wb-context.wb-render .btn-primary:hover { background: var(--accent-fill); color: var(--wb-paper); }
.wb-context.wb-render .btn-primary:disabled { opacity: .45; }
.wb-context.wb-render .btn:not(.btn-primary) { border: 1px solid var(--line-strong); }
/* the card's one row of choices: the studio's own chips, not the bar's flat buttons */
.wb-render-choices { display: flex; flex-wrap: wrap; gap: 5px; }
.wb-context.wb-render .wb-render-choices .chip {
  height: auto; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface); color: var(--ink-muted); font-size: var(--t-meta);
}
.wb-context.wb-render .wb-render-choices .chip:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.wb-context.wb-render .wb-render-choices .chip.is-chosen { border-color: var(--accent); background: var(--accent-wash); color: var(--ink); }
/* a result still being made: its kept spot, dashed like a render waiting for its picture; never selectable */
.wb-ghost {
  position: absolute; display: grid; place-items: center; border: 1.5px dashed var(--line-strong); background: var(--wash); pointer-events: none;
}

/* the context bar: what this selection can become next */
.wb-context {
  position: absolute; z-index: 5; display: flex; align-items: center; gap: 2px; padding: 4px;
  border: 1px solid var(--line-strong); border-radius: var(--r-2); background: var(--surface); box-shadow: var(--shadow-pop); white-space: nowrap;
}
.wb-context button {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border: 0; border-radius: var(--r-1);
  background: transparent; color: var(--ink); font-size: var(--t-meta); font-weight: 500;
}
.wb-context button .i { color: var(--ink-muted); }
/* the bar's "…": what is used less (Bu parçadan, Adını değiştir, Panodan kaldır) */
.wb-more {
  position: absolute; right: 0; top: calc(100% + 6px); display: grid; min-width: 200px; padding: 4px;
  border: 1px solid var(--line-strong); border-radius: var(--r-2); background: var(--surface); box-shadow: var(--shadow-pop);
}
.wb-more[hidden] { display: none; }
.wb-more button { justify-content: flex-start; width: 100%; }
.wb-context button:hover { background: var(--accent-wash); }
.wb-context button:hover .i { color: var(--accent); }
.wb-context button:focus-visible, .wb-tools .tool:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wb-context .tool-sep, .wb-tools .tool-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line-strong); }

/* the board's own bar over the top edge of the pasteboard; zoom and keys sit in the status bar */
.wb-tools {
  position: absolute; left: 50%; top: 12px; z-index: 6; translate: -50% 0; display: flex; align-items: center; gap: 2px; padding: 4px;
  border: 1px solid var(--line-strong); border-radius: var(--r-2); background: var(--surface); box-shadow: var(--shadow-pop); white-space: nowrap;
}
.wb-tools .tool, .wb-zoom .tool {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 32px; height: 32px; padding: 0 10px;
  border: 1px solid transparent; border-radius: var(--r-1); background: transparent; color: var(--ink-muted); font: 500 var(--t-body)/1 var(--font-ui);
}
/* zoom in the board's bottom right corner: − %100 + (js/board.js zoomControl) */
.wb-zoom {
  position: absolute; right: 12px; bottom: 12px; z-index: 6; display: flex; align-items: center; gap: 2px; padding: 4px;
  border: 1px solid var(--line-strong); border-radius: var(--r-2); background: var(--surface); box-shadow: var(--shadow-pop);
}
.wb-zoom .tool { font-size: var(--t-title); }
.wb-zoom .wb-zoom-level { min-width: 56px; font: 500 var(--t-meta)/1 var(--font-mono); }
.wb-zoom .tool:hover { color: var(--ink); background: var(--wash-2); }
.wb-zoom .tool:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wb-tools .tool:hover { color: var(--ink); background: var(--wash-2); }
.wb-tools .tool[aria-pressed="true"] { background: var(--accent-wash); border-color: var(--accent); color: var(--accent); }
.wb-tools .tool.is-add, .wb-switcher { color: var(--ink); font-weight: 700; }
.wb-switcher-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.wb-menu { min-width: 220px; }
.wb-menu .menu-item { display: flex; align-items: center; gap: 12px; }
.wb-menu-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wb-menu-meta { color: var(--ink-muted); font-size: var(--t-meta); }
.wb-menu .wb-phone { display: none; }
.wb-menu .is-current { color: var(--accent); }
.wb-menu-head { margin: 0; padding: 8px 12px 4px; color: var(--ink-muted); font: var(--label-weight) var(--t-label) var(--font-label); letter-spacing: var(--label-track); text-transform: uppercase; font-variation-settings: var(--label-vary); }
.wb-menu-sep { margin: 4px 0; border: 0; border-top: 1px solid var(--line); }

/* the marquee drawn over the empty board */
.wb-marquee { position: absolute; z-index: 4; border: 1px solid var(--wb-select); background: var(--wb-select-wash); pointer-events: none; }

/* the empty board: where the first thing goes, in the slot it will take */
.wb-empty {
  position: absolute; left: 50%; top: 50%; z-index: 4; translate: -50% -50%; display: grid; justify-items: center; gap: 8px;
  width: min(560px, calc(100% - 32px)); padding: 24px; border: 1.5px dashed var(--dash); border-radius: var(--r-2); text-align: center;
}
.wb-empty-title { margin: 0; color: var(--ink); font-size: var(--t-title); font-weight: 700; }
.wb-empty-text { margin: 0 0 8px; color: var(--ink-muted); font-size: var(--t-body); }
.wb-empty-drop {
  display: grid; justify-items: center; gap: 6px; width: 100%; padding: 28px 16px; border: 1px solid var(--line); border-radius: var(--r-2);
  background: var(--surface); color: var(--ink-muted); font-size: var(--t-body); cursor: pointer;
}
.wb-empty-drop .i { width: 22px; height: 22px; color: var(--accent); }
.wb-empty-drop b { color: var(--ink); font-size: var(--t-body); font-weight: 700; }
.wb-empty-drop:hover { border-color: var(--accent); }
.wb-empty-drop:focus-visible, .wb-start:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wb-empty-text { margin: 8px 0 0; }
.wb-starts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; margin: 0; padding: 0; list-style: none; }
.wb-start {
  display: grid; gap: 4px; width: 100%; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface);
  color: var(--ink); text-align: left; cursor: pointer;
}
.wb-start:hover { border-color: var(--accent); }
.wb-start-img { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--r-1); background: var(--wash); }
.wb-start-img img { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .2s; }
.wb-start-img.is-loaded { background: var(--wb-paper); }
.wb-start-img.is-loaded img { opacity: 1; }
.wb-start b { overflow: hidden; font-size: var(--t-meta); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.wb-start small { color: var(--accent); font-size: var(--t-meta); font-weight: 700; }

/* a file dragged over the board */
.wb-drop {
  position: absolute; inset: 12px; z-index: 7; display: grid; place-items: center; border: 2px dashed var(--accent); border-radius: var(--r-2);
  background: var(--accent-wash); color: var(--ink); font-size: var(--t-body); font-weight: 700; pointer-events: none;
}

/* "Board'dan kaldırıldı · Geri al" */
.wb-undo {
  position: absolute; left: 50%; bottom: 16px; z-index: 7; translate: -50% 0; display: flex; align-items: center; gap: 12px; padding: 4px 4px 4px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-2); background: var(--pop); color: var(--ink); font-size: var(--t-body); box-shadow: var(--shadow-pop);
}

/* the library picker's rows when the board borrows it ("Kitaplıktan ekle") */
.wb-pick { display: grid; align-content: start; gap: 4px; min-width: 0; }
.picker-list .wb-pick-card { position: relative; align-content: start; }
.picker-list .wb-pick-card b { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; line-height: 1.3; }
.wb-pick-img { display: block; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--wash); }
.picker-list .wb-pick-img img { display: block; width: 100%; height: 100%; border: 0; border-radius: 0; opacity: 0; transition: opacity .2s; }
.wb-pick-img.is-loaded { background: var(--wb-paper); }
.wb-pick-img.is-loaded img { opacity: 1; }
.wb-pick-state { color: var(--accent); font-size: var(--t-meta); font-weight: 700; }
.picker-list .wb-pick-card:disabled { cursor: default; opacity: 1; }
.wb-pick.is-placed .wb-pick-state { color: var(--ink-muted); font-weight: 500; }
.wb-pick.is-placed .wb-pick-img { opacity: .55; }
.wb-pick.is-child .wb-pick-card { border-color: var(--accent-wash); background: var(--wash); }
.picker-list .wb-pick-more { display: block; width: auto; padding: 4px 8px; border: 0; background: transparent; color: var(--ink-muted); font-size: var(--t-meta); text-align: left; }
.picker-list .wb-pick-more:hover:not(:disabled) { color: var(--accent); }
.picker-list .wb-pick-more:disabled { color: var(--ink-muted); opacity: .6; }
.wb-pick-error { color: var(--amber); font-size: var(--t-meta); }
/* opened from the board, the picker is a panel at its right edge: the board stays live, so a card drags onto it */
#pickerDialog.is-side {
  position: fixed; inset: 56px 12px 12px auto; z-index: 20; width: min(400px, calc(100vw - 24px)); max-height: none; height: auto; margin: 0;
  box-shadow: var(--shadow-pop);
}
#pickerDialog.is-side .picker-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* the panel's search and kind chips (js/board-picker.js filterBar) */
.wb-pick-tools { display: grid; gap: 8px; margin-bottom: 12px; }
.wb-pick-search {
  height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-1); background: var(--surface); color: var(--ink); font: 400 var(--t-body) var(--font-ui);
}
.wb-pick-search:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.wb-pick-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.wb-pick-kinds .chip { height: 28px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface); color: var(--ink-muted); font-size: var(--t-meta); }
.wb-pick-kinds .chip[aria-checked="true"] { border-color: var(--accent); background: var(--accent-wash); color: var(--ink); }
.picker-list .wb-pick[hidden] { display: none; }
/* one card holds its picture, name, state and "N sonuç" together */
#pickerDialog.is-side .wb-pick { padding: 6px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); }
#pickerDialog.is-side .wb-pick .wb-pick-card { padding: 0; border: 0; background: transparent; }
#pickerDialog.is-side .wb-pick .wb-pick-more { padding: 2px 0; }
/* the board's own bar and zoom make room for the panel instead of going under it */
.has-side .wb-tools { left: calc((100% - 412px) / 2); }
.has-side .wb-zoom { right: 424px; }
.picker-list .wb-pick-card[draggable="true"]:not(:disabled) { cursor: grab; }

/* a phone: the same board, touch-sized controls; the selection's bar is a sheet along the bottom */
.wb-context.is-sheet { left: 8px; right: 8px; bottom: 8px; top: auto; overflow-x: auto; }
.wb-context.wb-render.is-sheet { width: auto; }
@media (max-width: 620px) {
  .wb-tools { top: 8px; gap: 0; max-width: calc(100% - 16px); padding: 2px; overflow-x: auto; }
  .wb-tools .tool, .wb-context button { min-width: 44px; height: 44px; padding: 0 4px; }
  .wb-tools .tool-sep { margin: 0 2px; }
  .wb-switcher-name { max-width: 140px; }
  /* a phone keeps Ekle, Sığdır and ⓘ in the bar; Not and Metin move into Ekle, pinch zooms, a finger pans */
  .wb-tools .wb-desk, .wb-zoom { display: none; }
  .wb-menu .wb-phone { display: flex; }
  .wb-tools .tool { padding: 0 10px; }
  .wb-context { max-width: calc(100% - 16px); overflow-x: auto; }
  .wb-undo .btn { min-height: 44px; }
  .wb-starts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* every control a finger reaches on the board: the board and add menus, the picker's add, the empty and failure
     states. 48 px, not 44: menus and dialogs open from scale(.97) (app.css), and a 48 px target is still over
     44 px on screen at the first frame of that entrance (46.6 px). */
  .wb-menu .menu-item, .wb-menu button, .wb-pick-more, .wb-empty .btn, .wb-failure .btn { min-height: 48px; }
}

@media (prefers-reduced-motion: no-preference) {
  .wb-context, .wb-undo { animation: wb-rise var(--dur-ui) var(--ease-out); }
  @keyframes wb-rise { from { opacity: 0; translate: 0 4px; } }
  .wb-undo { animation-name: wb-rise-centre; }
  @keyframes wb-rise-centre { from { opacity: 0; translate: -50% 4px; } }
  .wb-wait-line::after { animation: wb-wait 1.4s var(--ease-out) infinite; }
  @keyframes wb-wait { from { translate: -100% 0; } to { translate: 250% 0; } }
  .wb-node.is-new .wb-body { animation: wb-new 2.4s ease-out; }
  @keyframes wb-new { 0%, 60% { outline-color: var(--accent); } 100% { outline-color: transparent; } }
}

/* a note and a line of text the designer writes on the board (js/board-notes.js), kept in this browser */
.wb-note {
  min-height: 24px; color: var(--ink); font-size: var(--t-body); line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; cursor: default; outline: none;
}
.wb-note-sticky { min-height: 120px; padding: 14px 16px; background: var(--wb-note-ochre); box-shadow: var(--wb-node-shadow); }
.wb-note-sticky[data-colour="steel"] { background: var(--wb-note-steel); }
.wb-note-sticky[data-colour="graphite"] { background: var(--wb-note-graphite); }
.wb-note-text { padding: 4px 2px; font-size: var(--t-head); font-weight: 500; line-height: 1.3; }
.wb-note:empty::before { content: attr(data-empty); color: var(--ink-muted); }
.wb-node.is-writing .wb-note { cursor: text; outline: 2px solid var(--wb-select); outline-offset: 4px; }
.wb-swatch { width: 12px; height: 12px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--wb-note-ochre); }
.wb-swatch[data-colour="steel"] { background: var(--wb-note-steel); }
.wb-swatch[data-colour="graphite"] { background: var(--wb-note-graphite); }
.wb-context button[aria-pressed="true"] { color: var(--accent); }
/* a Lookbook shoot: its frames side by side, each model whole */
.wb-shoot { display: flex; }
.wb-shoot .wb-photo { flex: none; }
