/* Additions to the original style.css for the HTML lobby in front of the
   Godot client: join-by-code, class previews and the invite QR. */

html, body {
  /* style.css locks the page for the old in-page game canvas; the lobby is a
     normal page. */
  touch-action: auto;
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.join-form {
  display: flex;
  gap: 0.5rem;
}

.join-form input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cf-ink);
  border: 1px solid var(--cf-hairline);
  border-radius: 8px;
  outline: none;
}

.join-form input:focus {
  border-color: var(--cf-tangerine);
}

#lobby .join-form button {
  width: auto;
  padding: 0.7rem 1.2rem;
  margin: 0;
}

.class-modal {
  width: 400px;
  text-align: left;
}

.class-modal .eyebrow {
  margin-bottom: 0.4rem;
}

.class-modal h2 {
  margin-bottom: 1rem;
}

.class-btn {
  gap: 0.8rem;
  justify-content: flex-start;
  text-align: left;
  padding: 0.5rem 1rem 0.5rem 0.6rem;
}

.class-preview {
  width: 32px;
  height: 48px;
  image-rendering: pixelated;
  flex: none;
}

.class-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.class-desc {
  font-size: 0.8rem;
  color: #aaa;
}

.invite {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0.25rem 0 1rem;
  padding: 0.7rem;
  border: 1px solid #333;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #c9c9ce;
}

.invite-qr {
  flex: none;
  background: #fff;
  padding: 4px;
  border-radius: 6px;
  line-height: 0;
}

.invite-qr:empty {
  display: none;
}

.invite-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.invite-text button,
.modal-actions button {
  padding: 0.55rem 0.9rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* Phones: no point scanning a code on the device you're holding. */
@media (pointer: coarse) {
  .invite-qr {
    display: none;
  }
}

#lobby #installApp {
  margin-top: 0.6rem;
}

.install-tip {
  margin: 0.6rem 0 0;
  color: var(--cf-muted);
  font-size: 0.85rem;
}
