/* RiverX V157 — responsive behavior for desktop, tablet, and phone. */

@media (max-width: 1260px) {
  body.rx-v157 .home-table-grid,
  body.rx-v157 .rx-compact-table-row,
  body.rx-v157 .table-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.rx-v157 .table-shell {
    grid-template-columns: 185px minmax(0, 1fr) !important;
  }

  body.rx-v157 .table-info-card {
    grid-column: 1 !important;
  }

  body.rx-v157 .poker-stage {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
  }

  body.rx-v157 .side-console {
    grid-column: 1 !important;
    position: static !important;
  }

  body.rx-v157 .game-log {
    max-height: 190px !important;
  }

  body.rx-v157 .admin-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1040px) {
  body.rx-v157 {
    --rx157-sidebar: 76px;
  }

  body.rx-v157 .app-sidebar button,
  body.rx-v157 .app-sidebar.rx-clean-sidebar button {
    padding-inline: 13px !important;
    justify-content: center !important;
    gap: 0 !important;
    color: transparent !important;
    font-size: 0 !important;
  }

  body.rx-v157 .app-sidebar button > span {
    color: #a9b6c8 !important;
    font-size: 16px !important;
  }

  body.rx-v157 .rx-home-hero-v157 {
    align-items: flex-start;
    flex-direction: column;
  }

  body.rx-v157 .rx-home-hero-stats-v157 {
    width: min(100%, 360px);
  }

  body.rx-v157 .rx-nlh-table-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.rx-v157 .rx-crypto-card-grid,
  body.rx-v157 .compliance-status-grid,
  body.rx-v157 .legal-doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.rx-v157 .balance-requirement-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.rx-v157 .table-shell {
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .table-info-card,
  body.rx-v157 .poker-stage,
  body.rx-v157 .side-console {
    grid-column: 1 !important;
    grid-row: auto !important;
    position: static !important;
  }

  body.rx-v157 .table-info-card {
    display: grid !important;
    grid-template-columns: auto minmax(130px, 0.4fr) minmax(420px, 1fr) !important;
    align-items: center !important;
    gap: 12px !important;
  }

  body.rx-v157 .table-info-card h2 {
    margin: 0 !important;
  }

  body.rx-v157 .table-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.rx-v157 .table-meta > div {
    min-height: 46px !important;
    padding: 8px !important;
    display: grid !important;
    justify-items: start !important;
    gap: 3px !important;
  }

  body.rx-v157 .table-meta strong {
    text-align: left !important;
  }

  body.rx-v157 .side-console {
    grid-template-columns: repeat(2, minmax(0, 0.5fr)) minmax(260px, 1fr) !important;
  }

  body.rx-v157 .admin-shell {
    grid-template-columns: 185px minmax(0, 1fr) !important;
  }
}

@media (max-width: 820px) {
  body.rx-v157 {
    --rx157-topbar: 60px;
    padding-bottom: 68px;
  }

  body.rx-v157 .rx-fixed-top-nav {
    height: var(--rx157-topbar) !important;
    min-height: var(--rx157-topbar) !important;
    padding: 0 13px !important;
  }

  body.rx-v157 .rx-sidebar-toggle,
  body.rx-v157 .rx-topbar-sidebar-toggle {
    display: none !important;
  }

  body.rx-v157 .rx-fixed-brand-group {
    gap: 0 !important;
  }

  body.rx-v157 .rx-fixed-brand {
    width: 104px !important;
    min-width: 104px !important;
    height: 36px !important;
  }

  body.rx-v157 .rx-topbar-login-btn.button-64,
  body.rx-v157 .rx-topbar-register-btn.button-64 {
    min-width: 70px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding-inline: 12px !important;
    font-size: 11px !important;
  }

  body.rx-v157 .rx-topbar-balance-btn,
  body.rx-v157 .rx-topbar-cashier-btn,
  body.rx-v157 .rx-topbar-logout-btn,
  body.rx-v157 .rx-topbar-admin-btn {
    min-height: 36px !important;
    padding-inline: 10px !important;
    font-size: 10px !important;
  }

  body.rx-v157 .rx-topbar-account-copy {
    display: none !important;
  }

  body.rx-v157 .rx-topbar-account-btn {
    width: 38px !important;
    padding: 2px !important;
  }

  body.rx-v157 .rx-topbar-account-btn .rx-topbar-balance-caret {
    display: none !important;
  }

  body.rx-v157 .app-sidebar,
  body.rx-v157 .app-sidebar.rx-clean-sidebar,
  body.rx-v157.rx-sidebar-collapsed .app-sidebar,
  body.rx-v157.rx-sidebar-collapsed .app-sidebar.rx-clean-sidebar {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    z-index: 2000 !important;
    width: 100% !important;
    height: 68px !important;
    min-height: 68px !important;
    padding: 7px max(9px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(9px, env(safe-area-inset-left)) !important;
    overflow: visible !important;
    background: rgba(6, 15, 26, 0.97) !important;
    border: 0 !important;
    border-top: 1px solid var(--rx157-border) !important;
    backdrop-filter: blur(18px) !important;
  }

  body.rx-v157 .app-sidebar .sidebar-section,
  body.rx-v157 .app-sidebar .rx-main-menu {
    height: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 5px !important;
  }

  body.rx-v157 .app-sidebar .rx-admin-dashboard-link:not([hidden]) {
    position: fixed !important;
    z-index: 1 !important;
    inset: calc(var(--rx157-topbar) + 8px) 10px auto auto !important;
    width: auto !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 11px !important;
    color: var(--rx157-text-soft) !important;
    background: #0b1827 !important;
    border: 1px solid var(--rx157-border) !important;
    font-size: 9px !important;
  }

  body.rx-v157 .app-sidebar button,
  body.rx-v157 .app-sidebar.rx-clean-sidebar button,
  body.rx-v157.rx-sidebar-collapsed .app-sidebar button {
    width: 100% !important;
    min-height: 52px !important;
    padding: 5px 3px !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 4px !important;
    color: var(--rx157-muted) !important;
    font-size: 9px !important;
    text-align: center !important;
  }

  body.rx-v157 .app-sidebar button > span,
  body.rx-v157.rx-sidebar-collapsed .app-sidebar button > span {
    width: 17px !important;
    min-width: 17px !important;
    height: 17px !important;
    color: #9faeff !important;
    font-size: 14px !important;
  }

  body.rx-v157 .app-sidebar button::after {
    inset: auto 25% 1px !important;
    width: auto !important;
    height: 2px !important;
    border-radius: 3px 3px 0 0 !important;
  }

  body.rx-v157 main,
  body.rx-v157.rx-sidebar-collapsed main {
    width: 100% !important;
    min-height: calc(100vh - var(--rx157-topbar) - 68px) !important;
    margin: var(--rx157-topbar) 0 0 !important;
    padding: 20px 16px 34px !important;
  }

  body.rx-v157 .site-footer.riverx-legal-footer,
  body.rx-v157.rx-sidebar-collapsed .site-footer.riverx-legal-footer {
    width: 100% !important;
    margin: 0 !important;
    padding: 18px 16px 86px !important;
    grid-template-columns: 1fr auto !important;
  }

  body.rx-v157 .rx-footer-legal-v157 {
    grid-column: 1 / -1 !important;
    justify-items: start !important;
    text-align: left !important;
  }

  body.rx-v157 .section-heading {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 14px !important;
  }

  body.rx-v157 .lobby-actions {
    justify-content: flex-start !important;
  }

  body.rx-v157 .rx-home-hero-v157 {
    min-height: 0;
    margin-bottom: 24px;
    padding: 28px 24px;
  }

  body.rx-v157 .rx-home-hero-copy-v157 h1 {
    font-size: 42px;
  }

  body.rx-v157 .rx-auth-modal {
    grid-template-columns: 1fr !important;
    width: min(540px, 100%) !important;
  }

  body.rx-v157 .rx-auth-visual-panel {
    display: none !important;
  }

  body.rx-v157 .rx-auth-form-panel {
    min-height: 0 !important;
    padding: 38px 28px 28px !important;
  }

  body.rx-v157 .rx-rakeback-goal-grid,
  body.rx-v157 .balance-grid,
  body.rx-v157 .rx-account-dashboard-v98 {
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .rx-account-activity-card-v98,
  body.rx-v157 .rx-account-security-card-v100 {
    grid-column: auto !important;
  }

  body.rx-v157 .legal-hero-panel,
  body.rx-v157 .readiness-card {
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .table-info-card {
    grid-template-columns: auto minmax(120px, 0.45fr) minmax(0, 1fr) !important;
  }

  body.rx-v157 .side-console {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.rx-v157 .log-card {
    grid-column: 1 / -1 !important;
  }

  body.rx-v157 .action-panel {
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .admin-shell {
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .admin-sidebar-panel {
    position: static !important;
  }

  body.rx-v157 .admin-sidebar-nav {
    display: flex !important;
    overflow: auto !important;
    scroll-snap-type: x proximity !important;
  }

  body.rx-v157 .admin-sidebar-link {
    width: auto !important;
    min-width: max-content !important;
    scroll-snap-align: start !important;
  }

  body.rx-v157 .admin-sidebar-status-card {
    display: none !important;
  }

  body.rx-v157 .admin-two-col,
  body.rx-v157 .admin-poker-layout,
  body.rx-v157 .admin-security-layout,
  body.rx-v157 .admin-cashier-layout,
  body.rx-v157 .admin-private-manager-layout,
  body.rx-v157 .admin-profit-operations-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 620px) {
  body.rx-v157 .rx-fixed-top-nav {
    gap: 8px !important;
  }

  body.rx-v157 .rx-fixed-brand {
    width: 88px !important;
    min-width: 88px !important;
  }

  body.rx-v157 .rx-fixed-top-actions,
  body.rx-v157 .rx-topbar-session-actions,
  body.rx-v157 .rx-topbar-guest-actions {
    gap: 6px !important;
  }

  body.rx-v157 .rx-topbar-register-btn.button-64,
  body.rx-v157 .rx-topbar-login-btn.button-64 {
    min-width: 64px !important;
    padding-inline: 10px !important;
  }

  body.rx-v157 .rx-topbar-cashier-btn,
  body.rx-v157 .rx-topbar-logout-btn,
  body.rx-v157 .rx-topbar-admin-btn {
    width: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
  }

  body.rx-v157 main,
  body.rx-v157.rx-sidebar-collapsed main {
    padding-inline: 12px !important;
  }

  body.rx-v157 .site-footer.riverx-legal-footer,
  body.rx-v157.rx-sidebar-collapsed .site-footer.riverx-legal-footer {
    padding-inline: 14px !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  body.rx-v157 .riverx-footer-links {
    justify-content: flex-start !important;
  }

  body.rx-v157 .rx-home-hero-v157 {
    padding: 24px 20px;
    gap: 22px;
  }

  body.rx-v157 .rx-home-hero-copy-v157 h1 {
    font-size: 36px;
  }

  body.rx-v157 .rx-home-hero-stats-v157 {
    width: 100%;
    min-width: 0;
  }

  body.rx-v157 .home-table-grid,
  body.rx-v157 .rx-compact-table-row,
  body.rx-v157 .table-grid,
  body.rx-v157 .rx-crypto-card-grid,
  body.rx-v157 .compliance-status-grid,
  body.rx-v157 .legal-doc-grid {
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .rx-home-table-content-v157 {
    min-height: 132px;
    padding: 16px;
  }

  body.rx-v157 .rx-lobby-row-heading {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  body.rx-v157 .rx-view-all {
    width: 100% !important;
  }

  body.rx-v157 .rx-table-card-stats-v157 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.rx-v157 .rx-nlh-table-picker,
  body.rx-v157 .rx-auth-overlay,
  body.rx-v157 .rx-security-overlay,
  body.rx-v157 :where(.rx-spectator-overlay, .rx-hand-audit-overlay) {
    padding: 0 !important;
    align-items: stretch !important;
  }

  body.rx-v157 .rx-nlh-table-picker-panel,
  body.rx-v157 .rx-auth-modal,
  body.rx-v157 .rx-security-modal,
  body.rx-v157 :where(.rx-spectator-panel, .rx-hand-audit-panel) {
    width: 100% !important;
    max-width: none !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  body.rx-v157 .rx-nlh-table-picker-panel {
    padding: 22px 16px !important;
  }

  body.rx-v157 .rx-nlh-table-picker-header {
    padding-right: 38px !important;
  }

  body.rx-v157 .rx-nlh-table-picker-close {
    position: absolute !important;
    inset: 14px 14px auto auto !important;
  }

  body.rx-v157 .rx-nlh-table-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.rx-v157 .rx-auth-form-panel {
    min-height: 100dvh !important;
    padding: 64px 20px 28px !important;
  }

  body.rx-v157 .rx-security-modal {
    padding: 58px 20px 28px !important;
  }

  body.rx-v157 .rx-2fa-setup-grid {
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .rx-2fa-qr-card img {
    width: 170px !important;
    margin: 0 auto !important;
  }

  body.rx-v157 .rx-cashier-modal-view.active,
  body.rx-v157 .rx-rakeback-popup.active {
    padding: 0 !important;
    align-items: stretch !important;
  }

  body.rx-v157 .rx-cashier-modal,
  body.rx-v157 .rx-rakeback-popup-modal {
    width: 100% !important;
    max-width: none !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  body.rx-v157 .rx-cashier-modal-body {
    max-height: calc(100dvh - 158px) !important;
    padding: 14px !important;
  }

  body.rx-v157 .rx-cashier-modal-header,
  body.rx-v157 .rx-cashier-main-tabs {
    padding-inline: 14px !important;
  }

  body.rx-v157 .rx-cashier-balance-chip {
    min-width: 92px !important;
  }

  body.rx-v157 .rx-deposit-hero-v131,
  body.rx-v157 .rx-withdraw-hero-v145 {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  body.rx-v157 .rx-deposit-secure-pill-v131,
  body.rx-v157 .rx-withdraw-security-badge-v145 {
    width: 100% !important;
    min-width: 0 !important;
  }

  body.rx-v157 .rx-deposit-selector-grid,
  body.rx-v157 .rx-deposit-info-grid,
  body.rx-v157 .rx-withdraw-primary-grid-v145,
  body.rx-v157 .rx-withdraw-secondary-grid-v145,
  body.rx-v157 .rx-deposit-payment-status-row,
  body.rx-v157 .rx-withdraw-quote-summary-v145,
  body.rx-v157 .rx-withdraw-confirm-grid-v145 {
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .rx-deposit-create-form {
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .rx-deposit-create-heading,
  body.rx-v157 .rx-deposit-estimate-strip,
  body.rx-v157 .rx-deposit-create-btn {
    grid-column: auto !important;
  }

  body.rx-v157 .rx-cashier-quick-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  body.rx-v157 .rx-cashier-quick-row button {
    min-width: 0 !important;
    padding-inline: 7px !important;
  }

  body.rx-v157 .rx-cashier-info-strip {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  body.rx-v157 .rx-deposit-qr-warning-grid {
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .rx-deposit-qr-card {
    justify-items: center !important;
  }

  body.rx-v157 .rx-withdraw-amount-row-v145 {
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .rx-conversion-equals {
    min-height: 20px !important;
  }

  body.rx-v157 .rx-withdraw-action-bar-v145 {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  body.rx-v157 .rx-withdraw-review-btn-v145 {
    width: 100% !important;
  }

  body.rx-v157 .rx-rakeback-popup-modal {
    padding: 58px 14px 24px !important;
  }

  body.rx-v157 .rx-rakeback-dashboard-header {
    padding-right: 0 !important;
  }

  body.rx-v157 .rx-rakeback-history-table-wrap {
    display: none !important;
  }

  body.rx-v157 .rx-rakeback-history-cards {
    display: grid !important;
    gap: 9px !important;
  }

  body.rx-v157 .rx-rakeback-history-card {
    padding: 12px !important;
    display: grid !important;
    gap: 7px !important;
    background: #081522 !important;
    border: 1px solid var(--rx157-border) !important;
    border-radius: var(--rx157-radius-sm) !important;
  }

  body.rx-v157 .rx-rakeback-history-card-row {
    display: flex !important;
    justify-content: space-between !important;
    gap: 10px !important;
    color: var(--rx157-text-soft) !important;
    font-size: 9px !important;
  }

  body.rx-v157 .rx-account-guest-panel-v98 {
    grid-template-columns: 46px minmax(0, 1fr) !important;
  }

  body.rx-v157 .rx-account-guest-icon-v98,
  body.rx-v157 .rx-account-avatar-v98 {
    width: 46px !important;
    height: 46px !important;
  }

  body.rx-v157 .rx-account-guest-actions-v98 {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.rx-v157 .rx-account-overview-grid-v98,
  body.rx-v157 .rx-account-balance-grid-v98,
  body.rx-v157 .readiness-list,
  body.rx-v157 .balance-requirement-grid {
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .rx-account-security-body-v100 {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  body.rx-v157 .table-info-card {
    grid-template-columns: 1fr 1fr !important;
  }

  body.rx-v157 .table-info-card .table-meta {
    grid-column: 1 / -1 !important;
  }

  body.rx-v157 .table-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.rx-v157 .poker-table {
    min-height: 430px !important;
    aspect-ratio: auto !important;
  }

  body.rx-v157 .action-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.rx-v157 .raise-entry-row {
    grid-template-columns: 100px minmax(0, 1fr) !important;
  }

  body.rx-v157 .raise-preset-row {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  body.rx-v157 .side-console {
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .log-card {
    grid-column: auto !important;
  }

  body.rx-v157 .admin-stat-grid,
  body.rx-v157 .admin-control-grid,
  body.rx-v157 .admin-restriction-grid,
  body.rx-v157 .admin-cashier-stat-grid,
  body.rx-v157 .admin-rake-metric-grid {
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .admin-section-head,
  body.rx-v157 .admin-card-head {
    flex-direction: column !important;
  }

  body.rx-v157 .admin-inline-actions {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .admin-inline-actions input,
  body.rx-v157 .admin-inline-actions select,
  body.rx-v157 .admin-inline-actions button {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 390px) {
  body.rx-v157 .rx-fixed-brand {
    width: 76px !important;
    min-width: 76px !important;
  }

  body.rx-v157 .rx-topbar-login-btn.button-64,
  body.rx-v157 .rx-topbar-register-btn.button-64 {
    min-width: 58px !important;
    padding-inline: 8px !important;
    font-size: 10px !important;
  }

  body.rx-v157 .rx-home-hero-copy-v157 h1 {
    font-size: 32px;
  }

  body.rx-v157 .rx-home-hero-stats-v157 {
    grid-template-columns: 1fr;
  }

  body.rx-v157 .rx-nlh-table-picker-grid {
    gap: 9px !important;
  }

  body.rx-v157 .rx-cashier-modal-title-wrap h2 {
    font-size: 17px !important;
  }

  body.rx-v157 .rx-cashier-balance-chip {
    min-width: 82px !important;
  }

  body.rx-v157 .rx-table-card-stats-v157 {
    grid-template-columns: 1fr !important;
  }

  body.rx-v157 .rx-table-card-stats-v157 > div {
    min-height: 45px !important;
  }

  body.rx-v157 .rx-cashier-quick-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.rx-v157 .raise-preset-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  body.rx-v157 .rx-cashier-modal,
  body.rx-v157 .rx-rakeback-popup-modal,
  body.rx-v157 .rx-auth-modal,
  body.rx-v157 .rx-security-modal,
  body.rx-v157 .rx-nlh-table-picker-panel {
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }
}
