/**
 * 网络监控组件样式
 * 颜色由 JS 动态注入，此处仅定义结构与动画
 */

/* ===== 胶囊 ===== */
.network-capsule {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    pointer-events: auto;
    transition: background 0.3s, color 0.3s;
    opacity: 0;
    transform: translateY(-4px);
    animation: netCapsuleIn 0.3s 0.1s forwards;
}

@keyframes netCapsuleIn {
    to { opacity: 1; transform: translateY(0); }
}

.network-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
}

.network-text {
    white-space: nowrap;
}

/* ===== 离线遮罩 ===== */
.network-offline-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.network-offline-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.network-offline-panel {
    background: #fff;
    border-radius: 16px;
    padding: 36px 40px;
    text-align: center;
    width: min(320px, calc(100vw - 60px));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.network-offline-icon {
    margin-bottom: 16px;
}

.network-offline-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.network-offline-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
}

.network-offline-spinner {
    display: flex;
    justify-content: center;
}

.network-offline-spinner-ring {
    width: 24px;
    height: 24px;
    border: 2.5px solid #e5e7eb;
    border-top-color: #ff6c69;
    border-radius: 50%;
    animation: netSpin 0.8s linear infinite;
}

@keyframes netSpin {
    to { transform: rotate(360deg); }
}
