.zls-open { overflow: hidden; }
/* Centered login dialog (desktop + mobile): the root is a flex box that
   centers the card both ways; the card scrolls inside when the screen is short. */
.zls-root {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  padding:
    max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}
.zls-root[hidden] { display: none; }
.zls-backdrop {
  position: absolute; inset: 0; background: rgba(6, 8, 20, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .2s ease;
}
.zls {
  position: relative; width: 100%; max-width: 440px; margin: auto;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  background: var(--surface, #14162b); color: var(--text, #f1f1f6);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 20px; padding: 1.4rem 1.25rem 1.25rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .45);
  opacity: 0; transform: translateY(12px) scale(.97);
  transition: transform .22s ease, opacity .22s ease;
  direction: rtl; text-align: right;
}
.zls-root.is-open .zls-backdrop { opacity: 1; }
.zls-root.is-open .zls { opacity: 1; transform: none; }
/* Bottom-sheet grab bar is not used by the centered dialog. */
.zls__handle { display: none; }
.zls__title { font-size: 1.08rem; font-weight: 800; margin: 0 0 .5rem; line-height: 1.6; }
.zls__gift { margin: 0 0 1rem; color: var(--accent, #e6c36a); font-size: .88rem; font-weight: 600; }
.zls__tg, .zls__phone {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px;
  border-radius: 14px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  box-sizing: border-box; margin-bottom: .6rem;
}
.zls__tg { border: 0; background: #229ED9; color: #fff; font-size: 1.02rem; }
.zls__phone { border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: inherit; }
.zls__email { display: block; text-align: center; font-size: 13px; color: var(--muted, #a3a6bf); margin: .25rem 0 .8rem; }
.zls__legal { font-size: .76rem; color: var(--muted, #a3a6bf); margin: .4rem 0 0; text-align: center; }
.zls__legal a { color: inherit; }
.zls__hint { font-size: .88rem; line-height: 1.8; margin: 0 0 .6rem; }
.zls__status { font-size: .86rem; color: var(--muted, #a3a6bf); margin: 0 0 .8rem; }
.zls__status::after { content: "…"; display: inline-block; animation: zls-dots 1.2s steps(4) infinite; overflow: hidden; vertical-align: bottom; width: 0; }
.zls__qr { margin: 0 0 .8rem; text-align: center; }
.zls__qr img { background: #fff; border-radius: 12px; padding: 6px; }
.zls__qr figcaption { font-size: .8rem; color: var(--muted, #a3a6bf); margin-top: .3rem; }
.zls__help { font-size: .82rem; color: var(--muted, #a3a6bf); }
.zls__help summary { cursor: pointer; margin-bottom: .4rem; }
.zls__help .zls__phone { margin-top: .5rem; }
.zls__tg-icon {
  width: 44px; height: 44px; border-radius: 50%; background: #229ED9; margin: 0 auto .7rem;
  animation: zls-pulse 1.6s ease-in-out infinite;
}
@keyframes zls-dots { to { width: 1.2em; } }
@keyframes zls-pulse { 50% { transform: scale(1.08); opacity: .8; } }
@media (prefers-reduced-motion: reduce) {
  .zls, .zls-backdrop { transition: none; }
  .zls { transform: none; }
  .zls__tg-icon, .zls__status::after { animation: none; }
}
