@import "../../tools/loremipsum/style.css";

/* ── Game of Life — mode tabs, canvas, and per-mode stat/banner styling ── */

.sidebar-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.mode-panel.hidden {
  display: none;
}

.game-stats-bar {
  padding: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-height: 1.2rem;
}

.mode-stat.hidden {
  display: none;
}

.life-canvas-view {
  min-height: unset;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.life-canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

#life-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  display: block;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  cursor: crosshair;
  touch-action: none;
}

.mode-banner {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  max-width: 92%;
  background: var(--bg-panel);
  border: 1px solid var(--accent-color);
  color: var(--text-primary);
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.mode-banner.hidden {
  display: none;
}

#sim-action-buttons.hidden {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .life-canvas-wrapper {
    max-width: 100%;
  }
}

/* Language Switcher */
.lang-switcher { position: relative; }
.lang-btn { display: flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.625rem; border-radius: 0.375rem; border: 1px solid var(--border-color); background: var(--bg-surface); color: var(--text-secondary); font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
.lang-btn:hover { color: var(--text-primary); border-color: var(--text-muted); background: var(--bg-hover); }
.lang-dropdown { position: absolute; top: calc(100% + 6px); right: 0; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 0.5rem; padding: 0.35rem; display: flex; flex-direction: column; gap: 0.2rem; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3); z-index: 100; min-width: 130px; }
.lang-option { background: none; border: none; color: var(--text-secondary); font-size: 0.78rem; font-weight: 500; padding: 0.4rem 0.65rem; border-radius: 0.35rem; text-align: left; cursor: pointer; transition: all 0.15s ease; }
.lang-option:hover { background: var(--bg-hover); color: var(--text-primary); }
.lang-option.active { color: var(--accent-color); background: var(--accent-glow); font-weight: 600; }
