
/* Shared Loading Screen */
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    color: #222222;
}

.loading-screen[hidden] {
    display: none;
}

.loading-content {
    width: min(340px, 85%);
    text-align: center;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 24px;
    border: 5px solid #e5e7eb;
    border-top-color: #16a34a;
    border-radius: 50%;
    animation: loading-spin 0.8s linear infinite;
}

.loading-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.loading-message {
    color: #666666;
    font-size: 14px;
    margin-bottom: 22px;
}

.loading-progress {
    height: 8px;
    overflow: hidden;
    background: #e5e7eb;
    border-radius: 20px;
}

.loading-bar-fill {
    width: 0%;
    height: 100%;
    background: #16a34a;
    border-radius: 20px;
    transition: width 0.25s ease;
}

.loading-percent {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
}

@keyframes loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-spinner {
        animation: none;
    }

    .loading-bar-fill {
        transition: none;
    }
}
