/* ABCPLAY · poker/style.css
 * Texas Hold’em: spillets 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.
 */

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(circle at top, #22654a, #0a2821 75%);
  color: #fff8e9;
  font:
    16px system-ui,
    sans-serif;
  min-height: 100vh;
}
main {
  max-width: 980px;
  margin: auto;
  padding: 16px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
header a {
  color: #f6d894;
  text-decoration: none;
}
h1 {
  font-size: clamp(26px, 5vw, 44px);
  margin: 10px 0;
}
button,
select {
  font: inherit;
  border: 0;
  border-radius: 12px;
  padding: 12px 15px;
  background: #f1d58f;
  color: #18362b;
  font-weight: 750;
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.panel {
  background: #ffffff12;
  border: 1px solid #ffffff24;
  border-radius: 18px;
  padding: 16px;
  margin: 14px 0;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}
.hand {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 110px;
  align-items: center;
}
.card {
  width: 72px;
  height: 105px;
  border-radius: 9px;
  border: 2px solid #d7d0bc;
  background: #fffdf5;
  color: #15221d;
  box-shadow: 0 5px 12px #0004;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 5px;
  font-size: 19px;
  font-weight: 900;
  user-select: none;
}
.card.red {
  color: #c52e39;
}
.card .suit {
  font-size: 35px;
  text-align: center;
}
.card.back {
  background: repeating-linear-gradient(45deg, #1e5487, #1e5487 7px, #3b79ae 7px, #3b79ae 14px);
  border: 5px solid #f9f6e9;
}
.card.chosen {
  outline: 4px solid #f6d58b;
  transform: translateY(-7px);
}
.card.small {
  width: 47px;
  height: 69px;
  font-size: 13px;
}
.card.small .suit {
  font-size: 22px;
}
.status {
  color: #f5d998;
  min-height: 25px;
  font-weight: 700;
}
.players {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
}
.player {
  background: #ffffff14;
  border-radius: 12px;
  padding: 12px;
}
.player.active {
  outline: 2px solid #f5d998;
}
.muted {
  color: #c6d9cd;
  font-size: 13px;
}
.hidden {
  display: none !important;
} /* Tilpasning til skærmstørrelse eller skærmretning. */
@media (max-width: 520px) {
  .card {
    width: 57px;
    height: 84px;
    font-size: 16px;
  }
  .card .suit {
    font-size: 27px;
  }
  .panel {
    padding: 11px;
  }
  .card.small {
    width: 37px;
    height: 55px;
    font-size: 11px;
  }
  .card.small .suit {
    font-size: 17px;
  }
}
/* Adaptive layouts for portrait and landscape phones */
html {
  overflow-x: hidden;
}
body {
  overflow-x: hidden;
}
main {
  width: 100%;
  max-width: 980px;
  padding: clamp(8px, 2vw, 16px);
}
header {
  gap: 8px;
}
header h1 {
  flex: 1 1 auto;
  min-width: 0;
}
button,
select {
  max-width: 100%;
  touch-action: manipulation;
}
.panel {
  max-width: 100%;
  min-width: 0;
}
.controls {
  gap: 8px;
}
.controls > * {
  flex-shrink: 0;
}
.hand {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(3px, 1.2vw, 9px);
  justify-content: center;
  align-items: center;
  max-width: 100%;
}
.players {
  grid-template-columns: repeat(auto-fit, minmax(min(135px, 100%), 1fr));
}
/* Tilpasning til skærmstørrelse eller skærmretning. */
@media (max-width: 600px) {
  .panel {
    padding: 10px;
    margin: 9px 0;
  }
  .card {
    width: clamp(45px, 13vw, 64px);
    height: calc(clamp(45px, 13vw, 64px) * 1.45);
    font-size: clamp(13px, 3.5vw, 18px);
    flex-shrink: 0;
  }
  .card .suit {
    font-size: clamp(21px, 6vw, 31px);
  }
  .card.small {
    width: clamp(34px, 9vw, 44px);
    height: calc(clamp(34px, 9vw, 44px) * 1.45);
  }
  button,
  select {
    padding: 10px 12px;
    font-size: 14px;
  }
}
/* Tilpasning til skærmstørrelse eller skærmretning. */
@media (max-width: 700px) and (orientation: landscape) {
  .panel {
    padding: 10px;
    margin: 8px 0;
  }
  .players {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
  .hand {
    justify-content: flex-start;
  }
  .card {
    width: clamp(48px, 8vw, 72px);
    height: calc(clamp(48px, 8vw, 72px) * 1.45);
  }
}

.board {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.pile {
  min-width: 42px;
  min-height: 75px;
  flex: 1;
  position: relative;
  border: 1px dashed #ffffff60;
  border-radius: 9px;
  padding: 3px;
}
.pile .card {
  margin-top: -65px;
  position: relative;
}
.pile .card:first-child {
  margin-top: 0;
}
.pile .card.down {
  background: repeating-linear-gradient(45deg, #1e5487, #1e5487 6px, #3b79ae 6px, #3b79ae 12px);
  color: transparent;
}
.card {
  cursor: pointer;
  touch-action: manipulation;
}
.card.selected {
  outline: 3px solid #ffdc6d;
  transform: translateY(-5px);
}
.rowline {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
}
.scroll {
  overflow-x: auto;
}
.tiny {
  font-size: 12px;
  color: #d5e7dd;
}
.seat {
  background: #ffffff14;
  padding: 10px;
  border-radius: 12px;
  min-width: 135px;
  flex: 1;
}
.seat.turn {
  outline: 2px solid #f1d58f;
}
.chips {
  font-weight: 800;
  color: #f1d58f;
}
.card.placeholder {
  background: #ffffff14;
  border: 2px dashed #ffffff80;
  color: #fff;
}
.card.placeholder .suit {
  font-size: 23px;
} /* Tilpasning til skærmstørrelse eller skærmretning. */
@media (max-width: 550px) {
  .pile .card {
    margin-top: -48px;
  }
  .board {
    gap: 3px;
  }
  .pile {
    min-width: 0;
  }
  .board .card {
    width: clamp(30px, 10vw, 50px);
    height: clamp(45px, 14vw, 75px);
    font-size: 12px;
    padding: 2px;
  }
  .board .card .suit {
    font-size: 20px;
  }
  .seat {
    min-width: 100px;
  }
  .rowline button {
    padding: 10px;
  }
}
.hand-hint {
  margin: 12px 0;
  padding: 12px 14px;
  background: #f7e9b4;
  color: #222;
  border-radius: 12px;
  font-size: 1.05rem;
  line-height: 1.45;
}
.hand-hint strong {
  font-weight: 800;
}
.hand-hint small {
  display: block;
  font-size: 0.78rem;
  margin-top: 3px;
  color: #444;
} /* Tilpasning til skærmstørrelse eller skærmretning. */
@media (max-width: 600px) {
  .hand-hint {
    font-size: 1rem;
    padding: 10px;
  }
}

/* Juster knapper og felter i poker-lobbyen */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.controls > button {
  align-self: flex-end;
  margin-bottom: 0;
}

.controls input,
.controls select {
  min-height: 46px;
}

.controls button {
  min-height: 46px;
}

/* Tilpasning til skærmstørrelse eller skærmretning. */
@media (max-width: 520px) {
  .controls {
    align-items: flex-end;
    gap: 10px;
  }
}

/* ABCPLAY Poker - visual table, unchanged game rules */
.poker-table-shell {
  padding: 12px 0;
  margin: 14px 0;
}
.poker-felt {
  position: relative;
  isolation: isolate;
  min-height: 600px;
  border: clamp(15px, 3vw, 32px) solid #302b29;
  border-radius: 48% / 36%;
  background: radial-gradient(ellipse at 50% 42%, #31875b 0%, #176440 65%, #0c462f 100%);
  box-shadow:
    inset 0 0 0 5px #987147,
    inset 0 0 45px #062d20,
    0 15px 35px #0008;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 28px 32px 22px;
  overflow: hidden;
}
.poker-felt:before {
  content: "ABCPLAY  ·  TEXAS HOLD’EM";
  position: absolute;
  top: 47%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(13px, 2.1vw, 25px);
  letter-spacing: 0.2em;
  font-weight: 900;
  color: #ffffff12;
  white-space: nowrap;
  pointer-events: none;
}
.opponents,
.poker-players {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  position: relative;
  z-index: 1;
}
.poker-seat,
.poker-players .seat {
  min-width: 0;
  flex: 1;
  text-align: center;
  background: #0b2b25b8;
  border: 1px solid #ffffff35;
  border-radius: 18px;
  padding: 10px;
  max-width: 230px;
  box-shadow: 0 5px 14px #0004;
}
.poker-seat b,
.poker-players .seat strong {
  display: block;
  font-size: clamp(12px, 1.4vw, 16px);
  margin-bottom: 5px;
}
.poker-seat .hand,
.poker-players .hand {
  justify-content: center;
  min-height: 66px;
  gap: 3px;
}
.poker-seat .card,
.poker-players .card {
  width: clamp(33px, 5vw, 56px);
  height: clamp(49px, 7vw, 82px);
  font-size: 13px;
  padding: 3px;
  flex-shrink: 0;
}
.poker-seat .card .suit,
.poker-players .card .suit {
  font-size: 24px;
}
.poker-seat.folded {
  opacity: 0.55;
}
.table-center {
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
  min-height: 190px;
}
.table-street {
  font-weight: 800;
  color: #f7dfa3;
  letter-spacing: 0.08em;
}
.community-cards {
  justify-content: center;
  flex-wrap: nowrap;
  min-height: 105px;
}
.table-pot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-weight: 800;
  color: #f5df9f;
  background: #052a2199;
  border: 1px solid #ffffff2c;
  padding: 8px 18px;
  border-radius: 24px;
}
.table-pot > span {
  font-size: 11px;
  letter-spacing: 0.18em;
}
.hero-seat {
  width: min(330px, 90%);
  max-width: none;
}
.seat-stack,
.seat-bet {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}
.seat-bet {
  font-size: 11px;
  color: #ffde9d;
}
.chip-stack {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
  color: #f8e3a8;
}
.chip-discs {
  display: inline-flex;
  align-items: center;
  padding-left: 5px;
  min-height: 26px;
}
.poker-chip {
  display: inline-block;
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 3px dashed #fff9dd;
  box-shadow:
    inset 0 0 0 3px #ffffff28,
    0 2px 3px #0008;
  margin-left: -6px;
  background: #a52d36;
}
.poker-chip.green {
  background: #168354;
}
.poker-chip.purple {
  background: #6743a1;
}
.poker-chip.black {
  background: #252b30;
}
.poker-chip.white {
  background: #ddd;
  color: #333;
  border-color: #333;
}
.chip-empty {
  color: #c9d3ca;
}
.poker-actions {
  margin-top: 14px;
}
.poker-actions .controls {
  justify-content: center;
}
.poker-felt .card {
  overflow: hidden;
}
.poker-felt .card .suit {
  line-height: 1.1;
}
.poker-felt .hand {
  max-width: 100%;
}
/* Tilpasning til skærmstørrelse eller skærmretning. */
@media (max-width: 700px) {
  .poker-felt {
    min-height: 520px;
    border-radius: 38% / 20%;
    padding: 18px 8px;
    gap: 8px;
    border-width: 14px;
  }
  .opponents,
  .poker-players {
    gap: 4px;
  }
  .poker-seat,
  .poker-players .seat {
    padding: 6px 3px;
    border-radius: 11px;
  }
  .poker-seat .card,
  .poker-players .card {
    width: 29px;
    height: 43px;
    font-size: 10px;
    padding: 2px;
    border-width: 1px;
  }
  .poker-seat .card .suit,
  .poker-players .card .suit {
    font-size: 17px;
  }
  .chip-discs {
    transform: scale(0.75);
    transform-origin: center;
  }
  .chip-stack {
    gap: 0;
    font-size: 10px;
  }
  .community-cards .card {
    width: clamp(39px, 10vw, 58px);
    height: clamp(57px, 15vw, 84px);
  }
  .table-center {
    min-height: 150px;
  }
  .poker-felt:before {
    font-size: 12px;
  }
}
