/* ==========================================================
   用餐系统 <-> 订货系统 无缝切换组件（供餐平台侧）
   ========================================================== */
.sw-transition {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px;
  background: linear-gradient(160deg, #fff7f0, #ffe9de);
  color: #c2523a; font-size: 14px; font-weight: 700; letter-spacing: .5px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .28s ease, visibility .28s;
}
.sw-transition.show { opacity: 1; visibility: visible; pointer-events: all; }
/* 从订货返回：body 脚本执行前即由 CSS 点亮遮罩，覆盖 HTML/JS 解析空窗 */
html.sw-from-order .sw-transition { opacity: 1; visibility: visible; pointer-events: all; }
.sw-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(229,110,75,.25); border-top-color: var(--theme-accent, #e56e4b);
  animation: sw-spin .8s linear infinite;
}
@keyframes sw-spin { to { transform: rotate(360deg); } }
.sw-transition .sw-msg { animation: sw-fade .4s ease both; }
@keyframes sw-fade { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

/* 切换反馈气泡 */
.sw-toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom,0px)); transform: translateX(-50%) translateY(10px);
  z-index: 300; max-width: 86%; padding: 9px 16px; border-radius: 20px;
  background: rgba(74,56,48,.94); color: #fff; font-size: 12px; line-height: 1.5; text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.16); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s, transform .25s, visibility .25s;
}
.sw-toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
