/* panel.css — panel boczny: status, notacja, zbite figury, sterowanie */

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-2);
}
.card-head h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); }
.hint { font-size: 11px; color: var(--text-dim); }

/* ---- status partii ---- */
.status-card { display: flex; flex-direction: column; gap: 6px; }

.status-turn {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 17px;
  font-weight: 650;
}
.turn-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1px solid var(--pc-white-edge);
  flex: 0 0 auto;
}
.turn-dot[data-color="w"] { background: var(--pc-white-fill); }
.turn-dot[data-color="b"] { background: var(--pc-black-fill); border-color: var(--pc-black-edge); }

.status-note { font-size: 13px; color: var(--text-dim); }
.status-note.is-check { color: var(--danger); font-weight: 600; }

.status-result {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent-strong);
}
.status-sub { font-size: 13px; color: var(--text-dim); }

.viewing-badge {
  align-self: flex-start;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* ---- notacja (.analysis-move-list w Fazie 4 dzieli ten sam uklad) ---- */
.move-list,
.analysis-move-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 2.4em 1fr 1fr;
  gap: 1px 2px;
  max-height: 320px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  scrollbar-width: thin;
}
.move-list:empty::after {
  content: "Partia jeszcze się nie zaczęła.";
  grid-column: 1 / -1;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-dim);
  padding: var(--sp-2) 0;
}

.move-num {
  color: var(--text-dim);
  padding: 3px 4px;
  text-align: right;
  font-size: 13px;
}

.move-san {
  appearance: none;
  border: none;
  background: none;
  text-align: left;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  color: var(--text);
}
.move-san:hover { background: var(--bg-sunken); }
.move-san.is-current { background: var(--accent); color: var(--accent-contrast); font-weight: 700; }
.move-san.is-empty { cursor: default; }
.move-san.is-empty:hover { background: none; }

.move-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-1);
  margin-top: var(--sp-3);
}
.nav-arrow {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg-sunken);
  border-radius: var(--radius-sm);
  padding: 7px 0;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.nav-arrow:hover:not(:disabled) { border-color: var(--accent); }
.nav-arrow:disabled { opacity: .35; cursor: not-allowed; }

/* ---- sterowanie ---- */
.controls-card { display: flex; flex-direction: column; gap: var(--sp-2); }
.controls-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }

.btn-analyze {
  appearance: none;
  width: 100%;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 11px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent);
  transition: background .15s var(--ease), transform .08s var(--ease);
}
.btn-analyze:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-analyze:active { transform: translateY(1px); }
.controls-note {
  margin: var(--sp-1) 0 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}

/* ---- paski graczy nad i pod plansza ---- */
/* szerokosc ograniczona juz przez rodzica (.board-stack) w layout.css */
.player-strip {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 30px;
  padding: 0 var(--sp-1);
}
.player-name { font-size: 14px; font-weight: 600; }
.player-strip.is-turn .player-name { color: var(--accent-strong); }

.captured { display: flex; align-items: center; gap: 1px; flex-wrap: wrap; }
.captured .piece {
  width: 19px;
  height: 19px;
  filter: none;
  opacity: .9;
  margin-right: -6px;   /* lekkie nachodzenie, jak na lichess */
}
.captured .piece:last-child { margin-right: 0; }

.material-diff {
  font-size: 13px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-weight: 600;
}

@media (max-width: 900px) {
  .move-list { max-height: 220px; }
}
