﻿/* style-phone_public.css - phone-mode and force-landscape overrides. */

body.force-landscape {
  transform: rotate(90deg);
  transform-origin: top left;
  position: absolute;
  top: 0;
  left: 100vw;
  width: 100vh;
  height: 100vw;
  overflow: hidden;
}

body.phone-mode .ui-btn {
  height: 100px;
  padding: 20px 32px;
  font-size: 30px;
  margin: 10px;
  border-radius: 10px;
}
body.phone-mode .ui-btn.small-btn {
  height: 68px;
  font-size: 22px;
  padding: 10px 18px;
  margin: 0;
}
body.phone-mode .tab-btn {
  font-size: 28px;
  padding: 16px 28px;
}

body.phone-mode .top-header {
  padding: 16px 20px;
}
body.phone-mode .top-header .ui-btn {
  height: 72px;
  font-size: 22px;
  padding: 12px 15px;
  margin: 4px;
}
body.phone-mode .top-header #leaveBtn {
  padding: 12px 13px;
}

body.phone-mode .controls-row {
  position: static;
  width: 100%;
  height: 0;
  margin: 0;
  padding: 0;
}
body.phone-mode .controls-center {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 270px;
  height: 80px;
  padding: 0;
  display: block;
}

body.phone-mode #throwTypeBtn {
  position: absolute;
  right: 50%;
  margin-right: 390px;
  top: 50%;
  transform: translateY(-50%);
  height: 68px;
  font-size: 22px;
  padding: 10px 18px;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: 0;
}
body.phone-mode #passBtn {
  position: absolute;
  left: 50%;
  margin-left: 400px;
  top: 50%;
  transform: translateY(-50%);
  height: 68px;
  font-size: 22px;
  padding: 10px 18px;
  margin-top: 0;
  margin-bottom: 0;
  margin-right: 0;
}

body.phone-mode #playBtn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  bottom: -200px;
  right: 50px;
  top: auto;
  left: auto;
  width: 150px;
  height: 150px;
  padding: 0;
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
  border-radius: 28px;
  z-index: 2600;
}
body.phone-mode #playBtn .pb-line1 {
  font-size: 32px;
  font-weight: bold;
  line-height: 1.15;
}
body.phone-mode #playBtn .pb-line2 {
  font-size: 20px;
  font-weight: normal;
  line-height: 1.15;
  margin-top: 4px;
}

body.phone-mode .p-info {
  padding: 8px 19px 13px 19px;
  min-width: 192px;
}
body.phone-mode .p-name {
  font-size: 26px;
}
body.phone-mode .p-title {
  font-size: 16px;
}
body.phone-mode .p-amount {
  font-size: 21px;
}
body.phone-mode .p-name-container.bottom .p-info {
  width: auto;
}
body.phone-mode .p-name-container.top {
  top: 44px;
  left: 480px;
}
body.phone-mode .p-name-container.left {
  left: 0;
  transform: translateY(-50%);
}
body.phone-mode .p-name-container.right {
  right: 0;
  transform: translateY(-50%);
}
body.phone-mode #name-bottom {
  position: absolute;
  left: 10px;
  bottom: 75px;
  top: auto;
  right: auto;
  margin: 0;
  transform: none;
  z-index: 3;
}

body.phone-mode .spectator-badge {
  top: 105px;
}

body.phone-mode .turn-area {
  position: absolute;
  left: 50%;
  bottom: 240px;
  transform: translateX(-50%);
  margin: 0;
  width: auto;
  pointer-events: none;
  z-index: 2500;
}
body.phone-mode .turn-indicator {
  font-size: 36px;
  height: auto;
  min-height: 40px;
  padding: 10px 26px;
  background: rgba(0,0,0,0.85);
  border-radius: 12px;
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
body.phone-mode .turn-indicator.error {
  font-size: 28px;
}

body.phone-mode .p-cards-container.top {
  top: 60px;
}
body.phone-mode .p-cards-container.left {
  left: 240px;
}
body.phone-mode .p-cards-container.right {
  right: 240px;
}

body.phone-mode .game-table {
  transform: translate(-50%, -50%) scale(1.3);
}
body.phone-mode .table-center {
  transform: translate(-50%, -50%) scale(1.3);
}

body.phone-mode .combo-text {
  font-size: 40px;
}
body.phone-mode .combo-text.winner-celebration {
  top: -35px;
  font-size: 52px;
  padding: 18px 40px;
}

body.phone-mode .hand-wrapper {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: 1500px;
  height: 250px;
  margin: 0;
}
body.phone-mode .hand-btns {
  position: absolute;
  right: -180px;
  bottom: 255px;
  top: auto;
  left: auto;
  transform: none;
  flex-direction: row;
  gap: 20px;
  z-index: 2500;
}
body.phone-mode .hand .card {
  width: 125px;
  height: 182px;
  font-size: 32px;
  padding: 12px;
}

body.phone-mode .lobby-title {
  font-size: 80px;
}
body.phone-mode .center-content {
  width: 1500px;
  margin-top: 220px;
}
body.phone-mode .auth-box {
  width: 900px;
  padding: 50px;
}
body.phone-mode .auth-title {
  font-size: 44px;
  margin-bottom: 30px;
}
body.phone-mode .auth-input,
body.phone-mode .swish-receiver-input,
body.phone-mode .swish-input,
body.phone-mode .history-filter {
  font-size: 30px;
  padding: 20px 28px;
}
body.phone-mode .room-list-box {
  width: 1200px;
  padding: 40px;
}
body.phone-mode .room-header h3 {
  font-size: 40px;
}
body.phone-mode #roomsContainer {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  max-height: 260px;
  padding-bottom: 8px;
  scrollbar-width: none;
}
body.phone-mode #roomsContainer::-webkit-scrollbar { display: none; }
body.phone-mode #roomsContainer > p:only-child {
  flex: 1;
  text-align: center;
  align-self: center;
  width: 100%;
}
body.phone-mode .room-item {
  flex: 0 0 380px;
  min-width: 380px;
  font-size: 22px;
  padding: 20px 16px;
}
body.phone-mode .room-item > div {
  font-size: 22px;
}
body.phone-mode .room-item .ui-btn {
  height: 60px;
  font-size: 20px;
  padding: 8px 16px;
}
body.phone-mode .user-info {
  font-size: 32px;
}
body.phone-mode .room-info {
  width: 1200px;
  padding: 40px;
  padding-bottom: 60px;
}
body.phone-mode .room-header button.ui-btn {
  height: 72px;
  font-size: 24px;
  padding: 12px 20px;
}
body.phone-mode .room-actions .ui-btn {
  height: 68px;
  font-size: 22px;
  padding: 10px 18px;
  margin: 6px 4px;
}
body.phone-mode #startBtn {
  height: 72px;
  font-size: 24px;
  padding: 12px 20px;
  margin: 8px 0;
}
body.phone-mode #lobby.center-content {
  position: absolute;
  top: 120px;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  margin: 0;
  padding: 10px 0 200px 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
body.phone-mode #lobby.center-content::-webkit-scrollbar { display: none; }
body.phone-mode #lobby .lobby-title { margin-bottom: 20px; }
body.phone-mode #lobby .room-list-box { margin-bottom: 20px; }
body.phone-mode #lobby .room-info { margin: 10px auto 40px auto; }

body.phone-mode .modal-content {
  width: 1700px;
  max-width: 92%;
  max-height: 92%;
  padding: 40px 48px;
}
body.phone-mode #scoreModal .modal-content,
body.phone-mode #leaderboardModal .modal-content,
body.phone-mode #profileModal .modal-content,
body.phone-mode #swishModal .modal-content {
  width: 1700px;
  height: 900px;
  max-width: 92%;
  max-height: 92%;
}
body.phone-mode #shopModal {
  justify-content: center !important;
  padding-right: 0 !important;
}
body.phone-mode #shopModal .modal-content {
  width: 1700px !important;
  height: 900px !important;
  max-width: 92% !important;
  max-height: 92% !important;
}
body.phone-mode #cardBackPreviewModal {
  display: none !important;
}
body.phone-mode #settingsModal .modal-content {
  width: 1480px !important;
  max-width: 88% !important;
  height: auto !important;
  min-height: 400px;
  padding: 30px 40px;
}
body.phone-mode .modal-content h2 {
  font-size: 56px;
  margin-bottom: 24px;
}
body.phone-mode .stat-row {
  font-size: 32px;
  padding: 16px 0;
}
body.phone-mode .tab-row {
  gap: 12px;
  margin-bottom: 24px;
}
body.phone-mode .history-filter {
  width: 500px;
  font-size: 26px;
  padding: 14px 22px;
}
body.phone-mode .settings-row {
  gap: 20px;
  margin-bottom: 30px;
}
body.phone-mode .settings-row input[type="range"] {
  height: 60px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
body.phone-mode .settings-row input[type="range"]::-webkit-slider-runnable-track {
  height: 16px;
  background: rgba(255,255,255,0.25);
  border-radius: 8px;
}
body.phone-mode .settings-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 44px;
  height: 44px;
  background: var(--border-color);
  border-radius: 50%;
  margin-top: -14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
body.phone-mode .settings-row input[type="range"]::-moz-range-track {
  height: 16px;
  background: rgba(255,255,255,0.25);
  border-radius: 8px;
}
body.phone-mode .settings-row input[type="range"]::-moz-range-thumb {
  width: 44px;
  height: 44px;
  background: var(--border-color);
  border-radius: 50%;
  border: none;
}
body.phone-mode .settings-row label {
  width: 180px;
  font-size: 32px;
}
body.phone-mode .settings-row .settings-value {
  width: 80px;
  font-size: 30px;
}

body.phone-mode .swish-result-item {
  font-size: 28px;
  padding: 20px 28px;
}
body.phone-mode .swish-results {
  max-height: 400px;
}

body.phone-mode .shop-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
body.phone-mode .shop-item {
  min-height: 200px;
  padding: 20px;
}
body.phone-mode .shop-item-name {
  font-size: 24px;
}
body.phone-mode .shop-item-status {
  font-size: 18px;
}

body.phone-mode .shop-cb-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
body.phone-mode .shop-cb-preview {
  width: 90px;
  height: 135px;
}

body.phone-mode .room-scoreboard {
  display: none !important;
}

body.phone-mode #winnerModal {
  top: 120px;
  right: 30px;
  width: 400px;
  padding: 16px 24px;
  cursor: pointer;
  animation: winnerGlow 1s infinite alternate;
  z-index: 1500;
  transform: none;
}
body.phone-mode #winnerModal #payoutBreakdown,
body.phone-mode #winnerModal #readyStatusText,
body.phone-mode #winnerModal #readyNextBtn,
body.phone-mode #winnerModal #winnerMinimizeBtn {
  display: none;
}
body.phone-mode #winnerModal #winnerText {
  font-size: 32px;
  margin: 0;
}
@keyframes winnerGlow {
  0% {
    box-shadow: 0 0 14px rgba(255, 206, 0, 0.5), 0 0 30px rgba(255, 206, 0, 0.2), 0 6px 20px rgba(0,0,0,0.55);
    border-color: rgba(255, 206, 0, 0.6);
  }
  100% {
    box-shadow: 0 0 34px rgba(255, 206, 0, 1), 0 0 60px rgba(255, 206, 0, 0.6), 0 6px 20px rgba(0,0,0,0.55), inset 0 0 20px rgba(255, 206, 0, 0.3);
    border-color: var(--border-color);
  }
}
body.phone-mode #winnerModal.winner-expanded {
  top: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  width: 900px;
  max-width: 92%;
  padding: 40px 50px;
  cursor: default;
  animation: none;
  z-index: 2700;
  box-shadow: 0 8px 40px rgba(0,0,0,0.75);
}
body.phone-mode #winnerModal.winner-expanded #payoutBreakdown,
body.phone-mode #winnerModal.winner-expanded #readyStatusText,
body.phone-mode #winnerModal.winner-expanded #readyNextBtn,
body.phone-mode #winnerModal.winner-expanded #winnerMinimizeBtn {
  display: block;
}
body.phone-mode #winnerModal.winner-expanded #winnerText {
  font-size: 48px;
  margin-bottom: 20px;
}
body.phone-mode #winnerModal.winner-expanded #payoutBreakdown {
  font-size: 28px;
  line-height: 1.6;
}
body.phone-mode #winnerModal.winner-expanded #readyStatusText {
  font-size: 22px;
  margin: 16px 0;
}
body.phone-mode #winnerModal.winner-expanded #readyNextBtn {
  display: inline-block;
  width: auto;
  min-width: 200px;
  height: 60px;
  padding: 10px 24px;
  font-size: 24px;
  margin: 20px auto 0 auto;
}
body.phone-mode #winnerModal.winner-expanded #winnerMinimizeBtn {
  display: flex;
}

body.phone-mode .chat-toggle-btn {
  display: flex;
  position: absolute;
  left: 20px;
  top: 250px;
  right: auto;
  bottom: auto;
  width: 70px;
  height: 70px;
  min-width: 70px;
  padding: 0;
  margin: 0;
  font-size: 36px;
  line-height: 1;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  gap: 0;
  z-index: 2500;
}
body.phone-mode .chat-toggle-btn .chat-icon {
  font-size: 36px;
  line-height: 1;
  display: inline-block;
}
body.phone-mode.chat-open .chat-toggle-btn { display: none; }
body.phone-mode.chat-open .chat-close-btn {
  display: flex;
  width: 120px;
  height: 120px;
  font-size: 54px;
  top: 15px;
  right: 15px;
}
body.phone-mode .chat-box {
  display: none;
}
body.phone-mode.chat-open .chat-box {
  display: flex;
  top: 0;
  bottom: 0;
  right: 0;
  width: 600px;
  height: 100%;
  z-index: 3000;
  border-radius: 12px 0 0 12px;
  background: var(--panel-bg);
  border-left: 2px solid rgba(255,255,255,0.2);
}
body.phone-mode.chat-open .chat-tabs {
  padding-right: 150px;
}
body.phone-mode.chat-open .chat-messages {
  font-size: 22px;
}
body.phone-mode.chat-open .chat-msg {
  margin-bottom: 14px;
}
body.phone-mode.chat-open .chat-input-area {
  padding: 16px;
}
body.phone-mode.chat-open .chat-input-area input {
  font-size: 32px;
  padding: 16px;
}
body.phone-mode.chat-open .chat-input-area button {
  font-size: 22px;
  padding: 14px 20px;
}
body.phone-mode.chat-open .chat-tab {
  font-size: 22px;
  padding: 14px;
}

body.phone-mode .player-list {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  font-size: 28px;
}

body.phone-mode .bottom-ui {
  height: 520px;
  padding-bottom: 20px;
}

/* Profile modal sectioned layout - phone sizes */
body.phone-mode .profile-title-badge {
  font-size: 32px;
  padding: 18px 28px;
  margin-bottom: 28px;
  border-radius: 10px;
}
body.phone-mode .profile-section {
  padding: 28px 32px;
  margin-bottom: 28px;
  border-radius: 14px;
  border-left-width: 8px;
}
body.phone-mode .profile-section-title {
  font-size: 28px;
  padding-bottom: 14px;
  margin-bottom: 14px;
}
body.phone-mode .profile-section .stat-row {
  font-size: 30px;
  padding: 18px 0;
}
body.phone-mode .profile-record {
  gap: 60px;
  padding: 28px 0 22px 0;
}
body.phone-mode .profile-record-num {
  font-size: 68px;
}
body.phone-mode .profile-record-label {
  font-size: 20px;
  margin-top: 8px;
}
body.phone-mode .profile-record-sep {
  height: 72px;
}

/* Round red X - phone sizing. Small tap target, not a full-width row. */
body.phone-mode .modal-x {
  top: 16px;
  right: 16px;
  width: 64px;
  height: 64px;
  font-size: 36px;
}
body.phone-mode #scoreModal .modal-content > h2,
body.phone-mode #swishModal .modal-content > h2,
body.phone-mode #profileModal .modal-content > h2,
body.phone-mode #leaderboardModal .modal-content > h2,
body.phone-mode #settingsModal .modal-content > h2,
body.phone-mode #shopModal .modal-content > h2 {
  padding-right: 80px;
}

/* Round red X - phone sizing (tighter than before) */
body.phone-mode .modal-x {
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  font-size: 24px;
}
body.phone-mode #scoreModal .modal-content > h2,
body.phone-mode #swishModal .modal-content > h2,
body.phone-mode #profileModal .modal-content > h2,
body.phone-mode #leaderboardModal .modal-content > h2,
body.phone-mode #settingsModal .modal-content > h2,
body.phone-mode #shopModal .modal-content > h2 {
  padding-right: 72px;
}

/* Modal header/close scaling for phone */
body.phone-mode .modal-header { padding-bottom: 20px; margin-bottom: 20px; }
body.phone-mode .modal-title { font-size: 32px; }
body.phone-mode .modal-close { width: 44px; height: 44px; font-size: 24px; }
body.phone-mode #modalHistoryContent { grid-template-columns: 1fr; gap: 16px; }
body.phone-mode .history-card { padding: 20px 24px; }
body.phone-mode .history-date { font-size: 22px; }
body.phone-mode .history-winner-pill { font-size: 18px; padding: 4px 14px; max-width: none; }
body.phone-mode .history-changes { gap: 6px; }
body.phone-mode .history-change-row { font-size: 22px; }
body.phone-mode .lb-row { padding: 22px 26px; font-size: 26px; }
body.phone-mode .lb-rank { font-size: 24px; min-width: 60px; }
body.phone-mode .lb-medal { font-size: 38px; min-width: 60px; }
body.phone-mode .profile-record-num { font-size: 60px; }
body.phone-mode .profile-section { padding: 24px 28px; margin-bottom: 20px; }
body.phone-mode .profile-section-title { font-size: 22px; }
body.phone-mode .profile-section .stat-row { font-size: 26px; padding: 14px 0; }
body.phone-mode .modal-scroll { padding-right: 6px; }

/* Beg for Credits - phone */
body.phone-mode .title-action-card { padding: 22px 26px; gap: 20px; }
body.phone-mode .title-action-heading { font-size: 26px; }
body.phone-mode .title-action-sub { font-size: 20px; }
body.phone-mode .title-action-btn { height: 56px; font-size: 22px; padding: 0 26px; min-width: 140px; border-radius: 8px; }
body.phone-mode .title-actions-list { gap: 16px; }

