@media (max-width: 767px) {
  /* Mobile inner pages use their own toolbar and bottom tabs. */
  body.mivo-inner-page > header.header,
  body.mivo-inner-page > .mobile-header { display:none; }
  body.nav-fixed.mivo-inner-page:has(> header.header) {
    padding-top:env(safe-area-inset-top, 0px);
  }
  body.nav-fixed.mivo-inner-page:has(> header.header):has(> .meo-role-detail) { padding-top:0; }
}

.mivo-route-loading {
  position: fixed;
  z-index: 999;
  inset: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: calc(16px + max(env(safe-area-inset-top, 0px), var(--mivo-loading-top, 0px))) 16px
    calc(16px + max(env(safe-area-inset-bottom, 0px), var(--mivo-loading-bottom, 0px)));
  color: var(--main-color, currentColor);
  background: var(--mivo-site-background, var(--body-bg-color, Canvas));
  font-size: 14px;
  line-height: 1.5;
  overscroll-behavior: contain;
  touch-action: none;
}

.mivo-route-loading[hidden] { display: none !important; }

/* Keep the current screen painted. Use the theme accent for ongoing navigation. */
.mivo-route-progress:not([hidden]) {
  position: fixed;
  z-index: 1001;
  inset: env(safe-area-inset-top, 0px) 0 auto;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
}
.mivo-route-progress::before {
  content: "";
  display: block;
  width: 38%;
  height: 100%;
  background: var(--focus-color, currentColor);
}
.mivo-route-progress [data-loading-label] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (prefers-reduced-motion: no-preference) {
  .mivo-route-progress::before { animation: mivo-route-progress 1.1s ease-in-out infinite alternate; }
}
@keyframes mivo-route-progress { to { transform: translateX(163%); } }

[data-mivo-link-pending], :where(a[href],button:enabled,[role="button"]:not([aria-disabled="true"])):active {
  opacity: .78;
}
#meo-inline-chat-view::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--body-bg-color, Canvas);
}

.mivo-route-mascot {
  display: block;
  inline-size: 96px;
  block-size: 96px;
  object-fit: contain;
}

.mivo-route-indicator,
.mivo-route-dots {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.mivo-route-dots i {
  inline-size: 4px;
  block-size: 4px;
  border-radius: 50%;
  background: var(--focus-color, currentColor);
}

@media (prefers-reduced-motion: no-preference) {
  .mivo-route-mascot {
    animation: mivo-route-mascot-float 1.9s ease-in-out infinite;
  }

  .mivo-route-dots i {
    animation: mivo-route-dot-pulse 1.2s ease-in-out infinite;
  }

  .mivo-route-dots i:nth-child(2) {
    animation-delay: .15s;
  }

  .mivo-route-dots i:nth-child(3) {
    animation-delay: .3s;
  }
}

@keyframes mivo-route-mascot-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes mivo-route-dot-pulse {
  0%, 65%, 100% { transform: translateY(0); opacity: .36; }
  32% { transform: translateY(-3px); opacity: 1; }
}

/* Zibll's full-screen account drawer already owns scrolling. Bootstrap's
   one-sided scrollbar compensation must not offset its native bottom sheets. */
@media (max-width: 768px) {
  body:has(.user-center) .modal.bottom {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Workspace bootstrap uses the same mascot, label and motion as site navigation. */
.mivo-route-loading.mivo-workspace-loading {
  position: fixed;
  inset: 0;
  z-index: 999;
  min-height: 0;
  height: 100dvh;
  padding: calc(16px + max(env(safe-area-inset-top,0px),var(--mivo-authoring-header,0px))) 24px
    calc(16px + max(env(safe-area-inset-bottom,0px),var(--mivo-native-tabs,0px)));
  background: var(--body-bg-color,Canvas);
}
