/**
 * IXNDN Loading动画
 */

/* ===== 全屏加载 ===== */
.ixndn-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    backdrop-filter: blur(4px);
    animation: ixndn-fade-in 0.2s ease;
}

.ixndn-loading-overlay .loader {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: ixndn-spin 0.8s linear infinite;
}

.ixndn-loading-overlay .loader-text {
    margin-top: 16px;
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* ===== 按钮加载 ===== */
.ixndn-loading-btn {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.ixndn-loading-btn .btn-text {
    visibility: hidden;
}

.ixndn-loading-btn .btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ixndn-spin 0.8s linear infinite;
}

/* ===== 卡片加载 ===== */
.ixndn-card-loading {
    animation: ixndn-pulse 1.5s ease-in-out infinite;
}

.ixndn-card-loading .loading-placeholder {
    background: #f0f0f1;
    border-radius: 4px;
    height: 20px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #f0f0f1 25%, #e2e8f0 50%, #f0f0f1 75%);
    background-size: 200% 100%;
    animation: ixndn-shimmer 1.5s infinite;
}

/* ===== 行加载 ===== */
.ixndn-row-loading {
    opacity: 0.4;
    pointer-events: none;
}

/* ===== 动画 ===== */
@keyframes ixndn-spin {
    to { transform: rotate(360deg); }
}

@keyframes ixndn-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes ixndn-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes ixndn-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== 加载指示器 ===== */
.ixndn-inline-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: ixndn-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

/* ===== 进度环 ===== */
.ixndn-progress-ring {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 40px;
}

.ixndn-progress-ring svg {
    transform: rotate(-90deg);
}

.ixndn-progress-ring .ring-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 3;
}

.ixndn-progress-ring .ring-fg {
    fill: none;
    stroke: #6366f1;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.ixndn-progress-ring .ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 600;
    color: #1e293b;
}

/* ===== Skeleton屏幕 ===== */
.ixndn-skeleton {
    background: #f0f0f1;
    border-radius: 8px;
    animation: ixndn-pulse 1.5s ease-in-out infinite;
}

.ixndn-skeleton-text {
    height: 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    background: #e2e8f0;
}

.ixndn-skeleton-text:last-child {
    width: 60%;
    margin-bottom: 0;
}

.ixndn-skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
    border-radius: 4px;
    background: #e2e8f0;
}

.ixndn-skeleton-image {
    height: 180px;
    border-radius: 8px;
    background: #e2e8f0;
    margin-bottom: 12px;
}