/* Compatibility layer for modals in the offline mirror. Does not force closed dialogs open. */
html, body { isolation: auto; }
/* Vue 3 modal components */
.base-modal {
  position: fixed !important; inset: 0 !important;
  z-index: 2147482000 !important;
  box-sizing: border-box;
}
.base-modal .v2-modal-wrapper {
  position: fixed !important; inset: 0 !important;
  z-index: 2147482001 !important;
  min-height: 100vh !important;
}
.base-modal .v2-modal-wrapper-backdrop {
  position: fixed !important; inset: 0 !important;
  z-index: 0 !important; min-height: 100vh !important;
}
.base-modal .v2-modal-wrapper__body {
  position: relative !important; z-index: 1 !important;
}
/* Bootstrap dialogs used by older sections */
.modal.show {
  display: block !important; visibility: visible !important;
  opacity: 1 !important; z-index: 2147482002 !important;
}
.modal-backdrop.show { z-index: 2147482001 !important; opacity: .65 !important; }
/* Keep dialog content above page navigation and fixed game controls. */
.v2-modal-open .topMenu, .modal-open .topMenu { z-index: 10 !important; }


/* Welvura cleanup: hide chat social/support shortcuts and footer VK/Telegram buttons. */
.v2-chat-header a:has(.v2-chat-header__vk),
.v2-chat-header a:has(.v2-chat-header__tg),
.v2-chat-header a:has(img.v2-chat-header__support:not(.v2-chat-header__info)) {
  display: none !important;
}
.footer .vk.flex,
.footer .tg.flex,
.footerMobile .vk.flex,
.footerMobile .tg.flex {
  display: none !important;
}

/* Game tutorial modals (Bubbles/Dice/Mines "Как играть"): the body has overflow-y:scroll, which turns
   overflow-x into auto, and the card was a fixed 360px - on phones that produced a horizontal scrollbar. */
.base-modal .v2-modal-wrapper__body {
  overflow-x: hidden !important;
  box-sizing: border-box;
  max-width: 100vw;
}
.base-modal .games-modal,
.base-modal .games-modal--auto-height {
  width: min(360px, calc(100vw - 48px)) !important;
  max-width: 100%;
  box-sizing: border-box;
}

/* Dice win message: dark.css sets a purple .infoButton background that overrode .winColor (green). */
.infoButton.winColor {
  background: linear-gradient(to right, #0acb90, #2bde6d) !important;
  box-shadow: #00d77e45 0 5px 23px;
}
