/* play-mode.css — game-day cockpit: hero, sub-tabs, panels, quick stratagems drawer. */

/* ── Root + shell ─────────────────────────────────────────────────────── */

#play-mode.play-root {
  padding: 0;
  min-height: 100%;
}

.play-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 64px);
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 22px 0;
  box-sizing: border-box;
  gap: 14px;
}

@media (max-width: 720px) {
  .play-shell { padding: 12px 10px 0; gap: 10px; }
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.play-hero {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 4px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.play-hero-title {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 28px;
  letter-spacing: 0.18em;
  color: var(--accent, #c8c8c8);
  text-transform: uppercase;
}

.play-hero-meta {
  display: flex;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.play-hero-army {
  font-weight: 600;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.95);
}

.play-hero-sub {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

/* ── Tabs nav ─────────────────────────────────────────────────────────── */

.play-tabs {
  display: flex;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0;
}

.play-tabs-title {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  padding: 6px 4px;
  flex-shrink: 0;
}

@media (max-width: 720px) {
  .play-tabs-title { display: none; }
}

.play-tabs-strip {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.play-tabs-strip::-webkit-scrollbar { height: 4px; }
.play-tabs-strip::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

.play-tab {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 10px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.play-tab:hover {
  color: rgba(255, 255, 255, 0.9);
}

.play-tab.is-on {
  color: var(--accent, #c8c8c8);
  border-bottom-color: var(--accent, #c8c8c8);
}

.play-tab:focus-visible {
  outline: 2px solid var(--accent, #c8c8c8);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ── Body / panels ────────────────────────────────────────────────────── */

.play-body {
  flex: 1;
  display: block;
  padding-bottom: 110px; /* leave room for the drawer when expanded */
}

.play-panel[hidden] { display: none; }
.play-panel { animation: play-fade 0.16s ease-out; }

@keyframes play-fade {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .play-panel { animation: none; }
}

/* ── Section / common ─────────────────────────────────────────────────── */

.play-section {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 14px;
}

.play-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.play-section-head h3 {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.92);
  text-transform: uppercase;
}

.play-section-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.play-help {
  margin: 6px 0 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.5;
}

.play-hint-quiet {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-style: italic;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.play-btn {
  appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  padding: 9px 16px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.play-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.play-btn:active { transform: translateY(1px); }

@media (prefers-reduced-motion: reduce) {
  .play-btn { transition: none; }
  .play-btn:active { transform: none; }
}

.play-btn-primary {
  background: var(--accent, #c8c8c8);
  color: var(--accent-on, #111);
  border-color: var(--accent, #c8c8c8);
  font-weight: 600;
}

.play-btn-primary:hover {
  background: var(--accent-hover, #e0e0e0);
  border-color: var(--accent-hover, #e0e0e0);
}

.play-btn-ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
}

.play-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.95);
}

/* ── Empty / CTA states ──────────────────────────────────────────────── */

.play-empty,
.play-cta {
  text-align: center;
  padding: 30px 20px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
}

.play-empty h3,
.play-cta h4 {
  margin: 0 0 8px;
  font-family: 'Cinzel', serif;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.92);
}

.play-empty h3 { font-size: 18px; }
.play-cta h4 { font-size: 16px; }

.play-empty p,
.play-cta p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  margin: 0 0 14px;
}

.play-cta-icon {
  font-size: 28px;
  color: var(--accent, #c8c8c8);
  margin-bottom: 6px;
  line-height: 1;
}

.play-empty-mini {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-style: italic;
  padding: 8px 0;
}

/* ── Match summary grid ───────────────────────────────────────────────── */

.play-match-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 12px 0 18px;
}

@media (max-width: 720px) {
  .play-match-grid { grid-template-columns: repeat(2, 1fr); }
}

.play-match-grid > div {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px 14px;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.play-match-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 6px;
}

.play-match-cp-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.play-match-cp-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent, #c8c8c8);
  line-height: 1;
}

.play-match-cp-dots {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.play-cp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: inline-block;
}

.play-cp-dot.is-on {
  background: var(--accent, #c8c8c8);
  box-shadow: 0 0 4px var(--accent, #c8c8c8);
}

.play-match-turn-val {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.play-match-phase {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

.play-match-vp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
}

.play-match-vp-you { color: var(--accent, #c8c8c8); }
.play-match-vp-opp { color: rgba(255, 180, 180, 0.9); }
.play-match-vp-sep { color: rgba(255, 255, 255, 0.25); }

.play-match-wounds-val {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.play-match-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Opponent grid ────────────────────────────────────────────────────── */

.play-opponent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

@media (max-width: 720px) {
  .play-opponent-grid { grid-template-columns: 1fr; }
}

.play-opponent-col {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 14px 16px;
}

.play-opponent-col h4 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.play-opponent-status { margin: 8px 0; }

.play-pill {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(var(--accent-rgb, 200, 200, 200), 0.12);
  color: var(--accent, #c8c8c8);
  border: 1px solid rgba(var(--accent-rgb, 200, 200, 200), 0.3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

/* ── Quick Stratagems drawer ──────────────────────────────────────────── */

.play-drawer {
  position: sticky;
  bottom: 0;
  margin: 0 -22px;
  padding: 0 22px;
  background: linear-gradient(to top, rgba(8, 10, 14, 0.96), rgba(8, 10, 14, 0.92));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  z-index: 5;
}

@media (max-width: 720px) {
  .play-drawer {
    margin: 0 -10px;
    padding: 0 10px;
  }
}

.play-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px;
  gap: 12px;
}

.play-drawer-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 0;
}

.play-drawer-caret {
  display: inline-block;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
  .play-drawer-caret { transition: none; }
}

.play-drawer-title {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.play-drawer-count {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 500;
}

.play-drawer-cp {
  font-size: 13px;
  color: var(--accent, #c8c8c8);
  font-weight: 500;
}

.play-drawer-cp strong {
  font-size: 16px;
  font-weight: 700;
  margin-right: 2px;
}

.play-drawer-cp-idle {
  color: rgba(255, 255, 255, 0.35);
  font-style: italic;
}

.play-drawer-body {
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0 14px;
  transition: max-height 0.2s ease, padding 0.2s ease;
}

.play-drawer.is-collapsed .play-drawer-body {
  max-height: 0;
  padding: 0;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .play-drawer-body { transition: none; }
}

.play-drawer-empty {
  padding: 14px 8px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  font-style: italic;
  text-align: center;
}

.play-drawer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.play-drawer-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  flex: 1 1 auto;
  min-width: 200px;
  max-width: 100%;
  overflow: hidden;
}

.play-chip-head {
  appearance: none;
  background: transparent;
  border: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font: inherit;
  text-align: left;
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
}

.play-chip-head:hover {
  background: rgba(255, 255, 255, 0.04);
}

.play-chip-name {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-chip-cost {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent, #c8c8c8);
  background: rgba(var(--accent-rgb, 200, 200, 200), 0.12);
  padding: 2px 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.play-chip-phase {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.play-chip-body {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 10px 10px;
  background: rgba(0, 0, 0, 0.2);
}

.play-chip-body[hidden] { display: none; }

.play-chip-desc {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 8px;
}

.play-chip-foot {
  display: flex;
  justify-content: flex-end;
}

.play-chip-use {
  appearance: none;
  background: var(--accent, #c8c8c8);
  color: var(--accent-on, #111);
  border: 0;
  padding: 4px 12px;
  border-radius: 4px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.play-chip-use:hover {
  background: var(--accent-hover, #e0e0e0);
}
