/* Mobile request and action feedback. */

.app-loading-bar,
.app-toast {
  display: none;
}

body.mobile-app-ui .app-loading-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 120;
  display: block;
  height: 3px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

body.mobile-app-ui .app-loading-bar span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, #91601d, #17685e);
  transform: translateX(-110%);
}

body.mobile-app-ui .app-loading-bar.active {
  opacity: 1;
}

body.mobile-app-ui .app-loading-bar.active span {
  animation: mobile-loading-slide 1.05s ease-in-out infinite;
}

body.mobile-app-ui .app-toast {
  position: fixed;
  right: 50%;
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 12px));
  z-index: 130;
  display: block;
  width: max-content;
  max-width: calc(100vw - 32px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  background: rgba(29, 39, 36, 0.94);
  color: #fff;
  box-shadow: 0 12px 32px rgba(18, 25, 23, 0.26);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 14px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

body.mobile-app-ui .app-toast.active {
  opacity: 1;
  transform: translate(50%, 0);
}

body.mobile-app-ui .app-toast.is-error {
  background: rgba(153, 35, 28, 0.96);
}

body.mobile-app-ui .app-toast.is-success {
  background: rgba(20, 105, 83, 0.96);
}

@keyframes mobile-loading-slide {
  0% {
    transform: translateX(-110%);
  }
  55% {
    transform: translateX(135%);
  }
  100% {
    transform: translateX(260%);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.mobile-app-ui .app-loading-bar.active span {
    animation-duration: 2s;
  }
}
