/**
 * shared.css
 * Common design tokens used by every page stylesheet.
 */

:root {
  --page-max-width: 430px;
  --page-outer-background: #ffffff;
  --page-content-background: #e9f1fe;
  --font-system: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-system-compact: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-chinese: system-ui, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-chinese-compact: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}

html.flutter-app,
html.flutter-app body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html.flutter-app body,
html.flutter-app flutter-view,
html.flutter-app flt-glass-pane {
  touch-action: none;
  overscroll-behavior: none;
}

/* Fill mobile viewports without changing the centered desktop canvas. */
@media (max-width: 767px) {
  :root {
    --page-max-width: 100%;
  }
}

/* Keep the desktop canvas white while the mobile-width page retains its blue surface. */
html[lang][class],
html[lang] body[data-page] {
  background: var(--page-outer-background);
}

/* Keep the mobile canvas filled on viewports taller than a page's content. */
html[lang][class] body[data-page]:not(.page-game-browser) {
  width: 100%;
  max-width: var(--page-max-width);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--page-content-background);
}

body[data-page] > .phone {
  background: url("images/bg.jpg") center top / 100% no-repeat var(--page-content-background);
}

.customer-unread-badge {
  position: absolute;
  z-index: 3;
  display: grid;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: #ff3f4d;
  color: #ffffff;
  font-family: var(--font-system);
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}

.customer-unread-badge[hidden] {
  display: none;
}

body[data-page] .brand.wanxin-brand {
  display: flex;
  align-items: center;
  gap: 6%;
}

body[data-page] .wanxin-brand img {
  display: block;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

body[data-page] .wanxin-brand .wanxin-symbol { width: 40%; }
body[data-page] .wanxin-brand .wanxin-wordmark { width: 44%; }
