/* Falak Arcade kit — shared look for the second wave of games. Loaded after arcade.css. */

/* cover art at the top of start panels */
.kit-art {
  width: 100%;
  max-width: 240px;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 0 0 1px var(--hairline), 0 14px 34px rgba(0, 0, 0, 0.35);
}
@media (max-height: 640px) { .kit-start .kit-art { max-width: 150px; } }

.kit-confetti {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 70;
  pointer-events: none;
}

.kit-result.is-best .fa-panel { box-shadow: 0 0 0 1px rgba(232, 182, 90, 0.55), 0 0 60px rgba(232, 182, 90, 0.18), 0 24px 60px rgba(0, 0, 0, 0.45); }

/* ---------------------------------------------------------------- dock buttons */
.kit-dock-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 64px;
  min-height: 52px;
  padding: 6px 10px;
  border: 0;
  border-radius: 16px;
  background: rgba(17, 30, 90, 0.72);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--parchment);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.2s linear, transform 0.2s var(--ease-out);
}
.kit-dock-btn:active { transform: scale(0.95); background: rgba(36, 64, 184, 0.6); }
.kit-dock-btn[disabled] { opacity: 0.4; pointer-events: none; }
.kit-dock-btn[aria-pressed="true"] { background: var(--gold); color: var(--lapis); box-shadow: none; }
.kit-dock-btn__icon svg { width: 22px; height: 22px; }
.kit-dock-btn__label { white-space: nowrap; }
.kit-dock-btn .kit-badge {
  position: absolute;
  top: 2px; right: 6px;
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--lapis);
  font-size: 11px;
  font-weight: 800;
}
.kit-dock-btn { position: relative; }
@media (hover: hover) { .kit-dock-btn:hover { background: rgba(36, 64, 184, 0.55); } }

.fa-dock .fa-seg { background: rgba(17, 30, 90, 0.72); box-shadow: inset 0 0 0 1px var(--hairline); }

/* ---------------------------------------------------------------- level picker */
.kit-levels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.kit-level {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border: 0;
  border-radius: 14px;
  background: rgba(242, 234, 216, 0.06);
  color: var(--parchment);
  font-weight: 700;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.kit-level.is-done { background: rgba(232, 182, 90, 0.18); color: var(--gold-soft); }
.kit-level.is-cur { box-shadow: inset 0 0 0 2px var(--gold); }
.kit-level.is-locked { opacity: 0.35; cursor: default; }
.kit-level__s { font-size: 9px; letter-spacing: 1px; color: var(--gold); line-height: 1; margin-top: 2px; }
.kit-levels-panel .fa-panel { max-width: 400px; }

/* ---------------------------------------------------------------- status line above or below a board */
.kit-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 12px;
  font-weight: 650;
  color: var(--mist);
  text-align: center;
}
.kit-status b { color: var(--parchment); }
.kit-dot {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  flex: none;
}

/* A stage laid out as a column: status line, board, optional tray. */
.kit-col {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 12px;
}
.kit-board-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Generic square-cell board drawn with CSS grid. Size it with --n (cells per side) and --size (board px). */
.kit-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, var(--n, 5)), 1fr);
  grid-template-rows: repeat(var(--rows, var(--n, 5)), 1fr);
  gap: var(--gap, 4px);
  width: var(--w, 320px);
  height: var(--h, 320px);
  padding: var(--gap, 4px);
  border-radius: 18px;
  background: rgba(7, 13, 44, 0.65);
  box-shadow: inset 0 0 0 1px var(--hairline), 0 18px 40px rgba(0, 0, 0, 0.3);
  touch-action: none;
}
.kit-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(242, 234, 216, 0.06);
  color: var(--parchment);
  font: inherit;
  cursor: pointer;
  touch-action: none;
}

/* Small "how far along" bar. */
.kit-progress {
  width: min(320px, 80%);
  height: 6px;
  border-radius: 999px;
  background: rgba(242, 234, 216, 0.1);
  overflow: hidden;
}
.kit-progress > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  transition: width 0.35s var(--ease-out);
}

/* Toggle chips such as difficulty pills inside panels. */
.kit-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.kit-pill {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(242, 234, 216, 0.06);
  color: var(--parchment);
  font-weight: 650;
  cursor: pointer;
}
.kit-pill[aria-pressed="true"] { background: var(--gold); color: var(--lapis); }

@keyframes kit-pop { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes kit-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes kit-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
.kit-shake { animation: kit-shake 0.32s linear; }

/* A canvas that fills its board area (Kit.canvas without an aspect). */
.kit-board-wrap > canvas.kit-fill { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
@media (max-width: 380px) {
  .kit-dock-btn { min-width: 54px; padding: 6px 8px; }
  .fa-dock { gap: 7px; padding-left: 8px; padding-right: 8px; }
  .fa-dock .fa-seg button { padding: 0 10px; }
}
.fa-panel__art .hl-thumb { width: 150px; height: 150px; border-radius: 12px; box-shadow: 0 0 0 1px var(--hairline), 0 12px 30px rgba(0, 0, 0, 0.35); }
.fa-stage > canvas.kit-full { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
