/* 
 * Blazor読み込み時のスタイル（インラインスタイルの外部化）
 * ファイル: wwwroot/css/blazor-loading.css
 * 目的: HTMLベースの軽量化
 */

/* ローディングコンテナのスタイル */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Blazor読み込み進行表示 */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1a73e8;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

/* 読み込み進行のパーセンテージ表示 */
.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 500;
    font-size: 1rem;
    color: #333;
    margin-top: 1rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* Blazor読み込み進行表示 */
.blazor-load-percentage {
    color: #333;
    font-weight: bold;
}

/* エラーUI表示時のスタイル */
#blazor-error-ui {
    background: lightyellow;
    border-top: 2px solid #dc3545;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
}

#blazor-error-ui .reload {
    color: #0066cc;
    text-decoration: underline;
}

#blazor-error-ui .dismiss {
    color: #666;
    cursor: pointer;
    float: right;
    font-weight: bold;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .loading-progress {
        width: 6rem;
        height: 6rem;
        margin: 15vh auto 1rem auto;
    }
    
    .loading-progress-text {
        font-size: 0.9rem;
    }
}