/*
 * Guessing game (game/index.html). Builds on ../styles.css (colours, header, buttons, layout).
 */

/* navigation in the header: "Butterflies of British Columbia › Guessing game".
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 8px;
}

.crumb-sep {
  opacity: 0.6;
  font-weight: 400;
}

.crumb-here {
  font-weight: 400;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

/* Butterflies to guess from: photo cards */
.g-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.g-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.g-card img,
.g-card .g-nophoto {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--soft);
}

.g-name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  padding: 8px 10px 0;
}

.g-sci {
  font-style: italic;
  font-size: 12.5px;
  color: var(--dim);
  padding: 1px 10px 0;
}

.g-credit {
  font-size: 11px;
  color: var(--dim);
  padding: 4px 10px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.g-note {
  font-size: 13px;
  color: var(--dim);
  margin: 0;
}

/* Bar over the map: what to do next + Reveal / Play again */
.g-bar {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 24px);
  padding: 8px 8px 8px 16px;
  border-radius: var(--radius);
  background: var(--green-900);
  color: #f4f6f0;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.g-bar[hidden] {
  display: none;
}

.g-bar .btn.go {
  background: var(--accent);
  color: var(--accent-ink);
  flex: 0 0 auto;
  min-height: 44px;
}

.g-bar .btn.go:hover:not(:disabled) {
  background: #f0ad57;
}

.g-bar .btn.go:disabled {
  opacity: 0.45;
  cursor: default;
}

.leaflet-container.guessing {
  cursor: crosshair;
}

@media (max-width: 800px) {
  .g-bar {
    bottom: 26px;
    width: calc(100% - 24px);
    justify-content: space-between;
  }

  .g-list {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}