/* cabinets.css — arcade cabinet selection grid styling
   Loads after arcade.css. Enhanced cabinet display with thumbnails, scores, and controls. */

.cabinet-section {
  margin: 14px auto;
  max-width: 960px;
}

/* Featured cabinet banner */
.cabinet-featured {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: linear-gradient(135deg, #ff5d5d, #d9932f);
  border: 3px solid var(--ink);
  border-radius: 14px 18px 14px 18px;
  padding: 16px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--shadow);
  transition: translate .12s, box-shadow .12s;
}
.cabinet-featured:hover { translate: 0 -2px; }
.cabinet-featured .feature-img {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.cabinet-featured .feature-info {
  text-align: center;
  color: #fff;
  flex: 1;
}
.cabinet-featured .feature-name {
  font-family: var(--font-mono);
  font-size: 1.5em;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: 0.5px;
}
.cabinet-featured .feature-emoji {
  font-size: 2em;
  margin-bottom: 6px;
}
.cabinet-featured .feature-desc {
  font-size: 0.9em;
  opacity: 0.9;
  margin: 4px 0 0;
}
.cabinet-featured .feature-link {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  background: var(--ink);
  color: var(--mustard);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.9em;
  transition: background .12s;
}
.cabinet-featured .feature-link:hover {
  background: var(--paper);
}

/* Cabinet grid - enhanced */
.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.cabinet-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px;
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  line-height: 1.1;
  background: var(--card);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--shadow);
  transition: translate .15s, box-shadow .15s, transform .15s;
  position: relative;
  min-height: 180px; /* ensure consistent card heights */
}
.cabinet-card:hover {
  translate: 0 -4px;
  box-shadow: 6px 6px 0 var(--shadow);
}
.cabinet-card[aria-current="true"] {
  background: var(--mustard);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--shadow);
  translate: 2px 2px;
}
.cabinet-card svg {
  width: 64px;
  height: 64px;
  margin: 0;
  flex-shrink: 0;
  stroke: var(--ink);
  fill: none;
}
.cabinet-card .cabinet-name {
  font-size: 0.95em;
  margin: 4px 0;
}
.cabinet-card .cabinet-emoji {
  font-size: 1.5em;
  margin-bottom: 4px;
}
.cabinet-card .cabinet-score {
  font-size: 0.75em;
  opacity: 0.8;
  margin-top: 4px;
  color: var(--ink);
}
.cabinet-card .cabinet-cat {
  font-size: 0.7em;
  opacity: 0.6;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Cabinet thumbnail - inline SVG with better detail */
.cabinet-card svg {
  transition: transform .15s;
}
.cabinet-card:hover svg {
  transform: scale(1.05);
}

/* Cabinet icon class for inline SVG thumbnails */
.cabinet-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  stroke: var(--ink);
  fill: none;
  margin: 0 0 8px;
  display: block;
}

/* Tap targets - minimum 44px for WCAG AA compliance */
.cabinet-card,
.cabinet-card a,
.cabinet-card button,
.cat-btn,
.ctrl-card kbd {
  min-height: 44px;
  min-width: 44px;
}

/* Search input for cabinet grid */
.cabinet-search {
  margin: 12px 0 8px;
  text-align: center;
}
.cabinet-search label {
  font-weight: 600;
  margin-right: 8px;
  color: var(--ink);
  opacity: 0.8;
}
.cabinet-search input[type="search"] {
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-size: 0.9em;
  min-width: 180px;
  max-width: 280px;
}
.cabinet-search input[type="search"]::placeholder {
  color: var(--ink);
  opacity: 0.5;
}
.cabinet-search input[type="search"]:focus {
  outline: none;
  border-color: var(--mustard);
  box-shadow: 0 0 0 2px var(--paper);
}

/* Category filter buttons - enhanced */
.cabinet-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 8px 0;
}
.cat-btn {
  font-weight: 700;
  font-size: 13px;
  padding: 8px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition: translate .12s, background .12s;
  position: relative;
}
.cat-btn:hover { translate: 0 -2px; background: var(--paper); }
.cat-btn.active {
  background: var(--mustard);
  box-shadow: 3px 3px 0 var(--shadow);
}
.cat-btn[data-category] {
  --cat-color: var(--ink);
  border-color: var(--cat-color);
}
.cat-btn[data-category] small {
  font-size: 0.8em;
  opacity: 0.7;
  margin-left: 4px;
}

/* High score summary */
.cabinet-highscores .hs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ink);
  transition: background .12s;
}
.cabinet-highscores .hs-row:hover { background: var(--card); }
.cabinet-highscores .hs-row:last-child { border-bottom: none; }
.cabinet-highscores .hs-rank {
  font-size: 1.1em;
  font-weight: 800;
  width: 30px;
  text-align: center;
}
.cabinet-highscores .hs-emoji {
  font-size: 1.3em;
}
.cabinet-highscores .hs-name {
  flex: 1;
  text-align: center;
  font-weight: 600;
}
.cabinet-highscores .hs-score {
  font-family: var(--font-mono);
  font-size: 1em;
  color: var(--slime-dark);
}

/* Controls help panel - individual grid layout */
.cabinet-controls {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.ctrl-card {
  background: var(--card);
  border: 2px dashed var(--ink);
  border-radius: 12px;
  padding: 12px 16px;
}
.ctrl-card h3 {
  margin: 0 0 8px;
  font-size: 1em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ctrl-card .ctrl-game {
  font-weight: 800;
}
.ctrl-card .ctrl-label {
  font-size: 0.85em;
  opacity: 0.8;
  margin: 6px 0;
}
.ctrl-card .ctrl-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.ctrl-card kbd {
  font-family: ui-monospace, monospace;
  font-size: 0.8em;
  padding: 4px 8px;
  background: var(--slime);
  border: 1px solid var(--ink);
  border-radius: 4px;
  color: var(--ink);
}

/* Responsive adjustments */
@media (max-width: 700px) {
  .cabinet-featured {
    flex-direction: column;
    text-align: center;
    padding: 12px;
  }
  .cabinet-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  .cabinet-card {
    padding: 12px;
    font-size: 0.9em;
  }
  .cabinet-card svg { width: 56px; height: 56px; }
  .cabinet-icon { width: 56px; height: 56px; }
  .cabinet-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .cabinet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cabinet-featured .feature-img { width: 64px; height: 64px; }
  .cabinet-featured {
    padding: 10px;
  }
  .cabinet-search input[type="search"] {
    min-width: 100%;
    max-width: 100%;
  }
}