/* Player v3.10.143 — Android/iOS readiness + no-reflow game drawer + support launcher motion. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  min-height: 100%;
  min-height: 100dvh;
}

body {
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

button, a, [role="button"], input, select, textarea {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.content,
.sidebar-nav,
.game-frame,
.support-popup-card {
  -webkit-overflow-scrolling: touch;
}

/* Desktop LOTTO: sidebar becomes a transform-only overlay so opening it no longer
   resizes/reflows the heavy game iframe. */
@media (min-width: 821px) {
  .portal.game-active,
  .portal.game-active.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .portal.game-active .content {
    grid-column: 1 / -1 !important;
    contain: layout paint style;
  }

  .portal.game-active .sidebar {
    position: fixed !important;
    left: 0 !important;
    top: var(--header-height, 68px) !important;
    bottom: 0 !important;
    width: var(--sidebar-width, 246px) !important;
    height: calc(100dvh - var(--header-height, 68px)) !important;
    z-index: 58 !important;
    transform: translate3d(0,0,0) !important;
    transition: transform 160ms cubic-bezier(.2,.8,.2,1), opacity 130ms ease !important;
    contain: layout paint style;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(12, 10, 10, .985) !important;
    box-shadow: 18px 0 38px rgba(0,0,0,.28) !important;
  }

  .portal.game-active.sidebar-collapsed .sidebar {
    transform: translate3d(calc(-100% - 16px),0,0) !important;
    opacity: .98;
    pointer-events: none;
  }

  .portal.game-active .game-runtime,
  .portal.game-active .game-frame {
    contain: layout paint style;
  }
}

/* During LOTTO runtime, avoid expensive glass effects above the iframe. */
.portal.game-active .topbar {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: rgba(17, 8, 10, .985) !important;
}

/* Mobile safe areas and stable dynamic viewport height. */
@media (max-width: 860px) {
  .portal {
    min-height: 100dvh !important;
    height: 100dvh !important;
  }

  .topbar {
    padding-top: max(8px, env(safe-area-inset-top)) !important;
  }

  .content {
    overscroll-behavior: contain;
  }

  .support-chat-launcher {
    right: max(10px, env(safe-area-inset-right)) !important;
    bottom: calc(92px + env(safe-area-inset-bottom)) !important;
  }
}

@supports (-webkit-touch-callout: none) {
  body { min-height: -webkit-fill-available; }
  input, textarea, select { font-size: max(16px, 1em); }
}

/* Customer Service: gentle vertical float, transform-only for 60fps. */
@keyframes supportLauncherFloat143 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -10px, 0); }
}

.support-chat-launcher:not([hidden]) {
  animation: supportLauncherFloat143 2.35s ease-in-out infinite !important;
  transform-origin: center;
  backface-visibility: hidden;
}

.support-chat-launcher:hover,
.support-chat-launcher:focus-visible,
.support-chat-launcher:active {
  animation-play-state: paused !important;
}

/* Keep accessibility and low-power devices calm. */
@media (prefers-reduced-motion: reduce) {
  .support-chat-launcher { animation: none !important; }
  .portal.game-active .sidebar { transition-duration: .01ms !important; }
}
