/* The styles of the pages of the game. Only its own pages load this file; every class carries the prefix of the app
   (`refranes-`) and only uses the variables of its theme. */

.refranes-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.refranes-game {
  display: grid;
  gap: var(--space-xl);
  margin-block: var(--space-xl);
}

.refranes-game h2,
.refranes-game h3 {
  margin: 0 0 var(--space-sm);
}

.refranes-clues,
.refranes-attempts,
.refranes-hits,
.refranes-words {
  margin: 0;
  padding: 0;
  list-style: none;
}

.refranes-clues {
  display: grid;
  gap: var(--space-sm);
}

.refranes-clues li {
  display: grid;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.refranes-clue-label {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.refranes-clue-body {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

.refranes-attempts {
  display: grid;
  gap: var(--space-md);
}

.refranes-words {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.refranes-word {
  padding: var(--space-xs) var(--space-sm);
  border: 2px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
}

/* The mark never depends on colour alone: a symbol and a text come with it, and the line differs too. */
.refranes-word[data-mark='same'] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
}

.refranes-word[data-mark='elsewhere'] {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.refranes-word[data-mark='absent'] {
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.refranes-word[data-stop='true'] {
  /* Fainter without losing contrast: a dashed line, never a lower opacity. */
  border-style: dashed;
}

.refranes-common {
  margin: var(--space-xs) 0 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.refranes-search {
  display: grid;
  gap: var(--space-sm);
}

.refranes-search label {
  font-weight: var(--font-weight-bold);
}

.refranes-search input {
  padding: var(--space-md);
  border: 2px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-background);
  color: var(--color-text);
  font: inherit;
}

.refranes-hint {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.refranes-hits {
  display: grid;
  gap: var(--space-xs);
}

.refranes-hits button {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.refranes-hits button:disabled {
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.refranes-result {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
}

.refranes-solution {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--color-primary-soft);
  color: var(--color-on-primary-soft);
}

.refranes-solution-text,
.refranes-proverb {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-snug);
}

.refranes-proverb {
  margin-block: var(--space-md) var(--space-xl);
}

.refranes-facts {
  display: grid;
  gap: var(--space-xs) var(--space-xl);
  grid-template-columns: max-content 1fr;
}

.refranes-facts dt {
  color: var(--color-text-muted);
}

.refranes-facts dd {
  margin: 0;
  font-weight: var(--font-weight-bold);
}

.refranes-draft {
  padding: var(--space-md);
  border: 2px dashed var(--color-danger);
  border-radius: var(--radius-lg);
  color: var(--color-danger);
}

.refranes-archive {
  display: grid;
  gap: var(--space-sm);
  padding: 0;
  list-style: none;
}

.refranes-how ol {
  display: grid;
  gap: var(--space-sm);
}

.refranes-solution a {
  color: inherit;
  text-decoration: underline;
}
