/* 全系统统一加载 / 提示样式 — am-loading v2026060501 */

.am-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999998;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.am-loading-overlay.am-loading-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.am-loading-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .28);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.am-loading-panel {
    position: relative;
    z-index: 1;
    min-width: 120px;
    padding: 22px 28px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(15, 23, 42, .18);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.am-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(35, 183, 229, .18);
    border-top-color: #23b7e5;
    border-radius: 50%;
    animation: am-spin .65s linear infinite;
}

.am-loading-text {
    font-size: 13px;
    color: #64748b;
    letter-spacing: .02em;
    user-select: none;
}

.am-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 99999999;
    overflow: hidden;
    opacity: 0;
    transition: opacity .15s ease;
}

.am-loading-bar.am-loading-bar-active {
    opacity: 1;
}

.am-loading-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: -35%;
    width: 35%;
    height: 100%;
    background: linear-gradient(90deg, #23b7e5, #1ab394);
    animation: am-loading-bar 1s ease-in-out infinite;
}

.am-toast-host {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    max-width: calc(100vw - 32px);
}

.am-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .14);
    font-size: 14px;
    line-height: 1.4;
    color: #334155;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: auto;
    max-width: 420px;
    word-break: break-word;
}

.am-toast.am-toast-show {
    opacity: 1;
    transform: translateY(0);
}

.am-toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.am-toast-error .am-toast-icon { background: #ed5565; }
.am-toast-success .am-toast-icon { background: #1ab394; }
.am-toast-info .am-toast-icon { background: #23b7e5; }
.am-toast-warning .am-toast-icon { background: #f8ac59; }

.am-toast-error { border-left: 3px solid #ed5565; }
.am-toast-success { border-left: 3px solid #1ab394; }
.am-toast-info { border-left: 3px solid #23b7e5; }
.am-toast-warning { border-left: 3px solid #f8ac59; }

@keyframes am-spin {
    to { transform: rotate(360deg); }
}

@keyframes am-loading-bar {
    0% { left: -35%; width: 35%; }
    50% { width: 45%; }
    100% { left: 100%; width: 35%; }
}

/* 兼容旧版 spiner-example 占位，避免布局跳动 */
#Loading.spiner-example,
#Loading.am-loading-overlay {
    height: auto;
    width: auto;
    padding: 0;
    margin: 0;
    background: transparent;
    bottom: auto;
    left: auto;
}
