/* ABCPLAY · uno/multiplayer/multi.css
 * UNO: multiplayerens layout, kort, knapper og skærmstørrelser. Regler længere nede kan overstyre tidligere regler.
 * .navn vælger en CSS-klasse; #navn vælger et HTML-id.
 * @media tilpasser udseendet til bestemte skærmstørrelser.
 */

/* UNO multiplayer: samme kortudtryk som UNO mod computeren */
.panel {
  margin: 14px 0;
}
.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
input {
  padding: 13px;
  border-radius: 10px;
  border: 1px solid #999;
  font-size: 16px;
  max-width: min(100%, 260px);
  margin: 6px 0 12px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.room-code {
  font-size: clamp(30px, 8vw, 52px);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-align: center;
  margin: 16px;
}
.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
}
.player-box {
  padding: 12px;
  border-radius: 12px;
  background: #ffffff12;
  border: 2px solid transparent;
}
.player-box.active {
  border-color: #f6cb54;
}
.hand {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
/* Del de samme proportioner, kanter, farver og typografi som normal UNO (.ucard) */
.mp-card {
  box-sizing: border-box;
  width: 75px;
  height: 110px;
  padding: 4px;
  border: 4px solid #fff;
  border-radius: 14px;
  color: white;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  line-height: 1.05;
  font-size: 24px;
  font-weight: 800;
  text-shadow: 0 1px 3px #0009;
  box-shadow: 0 4px 10px #0005;
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  user-select: none;
}
.mp-card > span {
  display: block;
  max-width: 100%;
  font-size: clamp(12px, 2.1vw, 24px);
  line-height: 1.05;
}
.mp-card small {
  display: block;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 700;
}
.color-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.color-choice button {
  min-height: 80px;
  font-size: 21px;
  font-weight: 800;
  color: white;
  border: 3px solid white;
  border-radius: 15px;
}
.overlay {
  position: fixed;
  inset: 0;
  background: #000b;
  display: grid;
  place-items: center;
  padding: 15px;
  z-index: 100;
}
.dialog {
  background: #243c34;
  color: white;
  padding: 24px;
  border-radius: 18px;
  width: min(100%, 430px);
  box-shadow: 0 15px 45px #0008;
}
.muted {
  opacity: 0.8;
}
.link {
  overflow-wrap: anywhere;
}
.mp-card:focus-visible,
button:focus-visible {
  outline: 3px solid #f6cb54;
  outline-offset: 3px;
}
/* Tilpasning til skærmstørrelse eller skærmretning. */
@media (max-width: 520px) {
  .mp-card {
    width: 60px;
    height: 88px;
    font-size: 20px;
    padding: 3px;
  }
  .mp-card > span {
    font-size: clamp(11px, 3.4vw, 18px);
  }
  .mp-card small {
    font-size: 9px;
  }
  .player-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .color-choice button {
    font-size: 18px;
  }
}
