/* Shared connection state for the kiosk variants and the mobile assistant. */
.connection-screen[hidden] { display: none !important; }
.connection-screen {
  position: fixed !important;
  z-index: 55 !important;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  overflow: hidden;
  pointer-events: none;
  color: #fff4d8;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(137, 102, 41, .2), transparent 42%),
    rgba(7, 7, 6, .94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  text-align: center;
  animation: connection-screen-enter .24s ease-out both;
}
.connection-screen__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 400px);
  max-height: 100%;
}
.connection-screen__logo {
  position: relative;
  width: min(44vw, 180px, 31vh);
  min-width: 110px;
  aspect-ratio: 1231 / 1278;
  margin-bottom: clamp(14px, 3vh, 30px);
  overflow: hidden;
  isolation: isolate;
  filter: drop-shadow(0 12px 34px rgba(217, 168, 81, .16));
}
.connection-screen__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.connection-screen__logo-ghost {
  opacity: .21;
  filter: saturate(.45);
}
.connection-screen__logo-fill {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
  animation: connection-logo-rise 3.4s ease-in-out infinite;
}
.connection-screen__wave {
  position: absolute;
  z-index: 2;
  top: 100%;
  left: -8%;
  width: 116%;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 223, 155, .58), transparent 68%);
  filter: blur(6px);
  animation: connection-wave-rise 3.4s ease-in-out infinite;
}
.connection-screen__eyebrow {
  color: #bfa267;
  font: 700 11px/1.4 Georgia, serif;
  letter-spacing: .26em;
}
.connection-screen__label {
  display: block;
  margin-top: 10px;
  font-size: clamp(18px, 2.2vw, 25px);
  font-weight: 700;
  line-height: 1.6;
}
.connection-screen__hint {
  margin: 7px 0 0;
  color: #b9ac93;
  font-size: clamp(11px, 1vw, 13px);
  line-height: 1.8;
}
.connection-screen__progress {
  width: min(155px, 48vw);
  height: 3px;
  margin-top: 24px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(231, 203, 140, .19);
}
.connection-screen__progress span {
  display: block;
  width: 48%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #f4d99b, #bc9048);
  box-shadow: 0 0 12px rgba(244, 217, 155, .55);
  animation: connection-progress-sweep 1.6s ease-in-out infinite;
}
@keyframes connection-screen-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes connection-logo-rise {
  0% { clip-path: polygon(0 100%, 25% 100%, 50% 100%, 75% 100%, 100% 100%, 100% 100%, 0 100%); opacity: 1; }
  23% { clip-path: polygon(0 78%, 25% 75%, 50% 79%, 75% 76%, 100% 78%, 100% 100%, 0 100%); }
  48% { clip-path: polygon(0 53%, 25% 50%, 50% 54%, 75% 51%, 100% 53%, 100% 100%, 0 100%); }
  72% { clip-path: polygon(0 27%, 25% 24%, 50% 28%, 75% 25%, 100% 27%, 100% 100%, 0 100%); }
  88% { clip-path: polygon(0 0, 25% 0, 50% 0, 75% 0, 100% 0, 100% 100%, 0 100%); opacity: 1; }
  100% { clip-path: polygon(0 0, 25% 0, 50% 0, 75% 0, 100% 0, 100% 100%, 0 100%); opacity: 0; }
}
@keyframes connection-wave-rise {
  0% { top: 100%; opacity: 0; transform: rotate(-2deg); }
  15% { opacity: .65; }
  72% { top: 26%; opacity: .65; transform: rotate(2deg); }
  88%, 100% { top: 0; opacity: 0; transform: rotate(-2deg); }
}
@keyframes connection-progress-sweep {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}
@media (prefers-reduced-motion: reduce) {
  .connection-screen, .connection-screen__logo-fill,
  .connection-screen__wave, .connection-screen__progress span { animation: none !important; }
  .connection-screen__logo-fill { clip-path: inset(35% 0 0 0); opacity: 1; }
  .connection-screen__wave { display: none; }
  .connection-screen__progress span { width: 55%; transform: none; }
}
@media (forced-colors: active) {
  .connection-screen { color: CanvasText; background: Canvas; border: 2px solid CanvasText; }
  .connection-screen__hint, .connection-screen__eyebrow { color: CanvasText; }
  .connection-screen__progress { border: 1px solid CanvasText; }
}
