/* ===================================================================================================
    GnBusy — 통신·페이지 로딩 표시(js/components/gn-busy.js). 화면을 덮지 않는다(pointer-events: none).
    - 칩: 화면 위쪽 가운데 알약 — 흰 바탕 + 헤어라인 + 얕은 그림자, 스피너(.gn-spinner) + 13px 문구.
    - 바: 화면 맨 위 0.1875rem 막대, 파랑 구간이 좌→우로 흐른다.
    - lock: 버튼 안 글자 앞에 스피너를 얹는다.
    - 색·간격·반경·그림자·z-index 는 tokens.css, 길이는 rem(규칙 1·3).
=================================================================================================== */
.gn-busy {
    position: fixed;
    top: 4.75rem;
    left: 50%;
    z-index: var(--gn-z-guide);
    display: flex;
    align-items: center;
    gap: var(--gn-space-2);
    max-width: calc(100vw - 2rem);
    padding: var(--gn-space-2) var(--gn-space-4);
    font-size: 0.8125rem;
    font-weight: var(--gn-font-weight-medium);
    line-height: 1.25rem;
    color: var(--gn-color-text-secondary);
    background: #fff;
    border: var(--gn-border-hairline) solid var(--gn-color-border-default);
    border-radius: var(--gn-radius-pill);
    box-shadow: var(--gn-shadow-md);
    opacity: 0;
    transform: translate(-50%, -0.5rem);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}
.gn-busy.gn-busy-on {
    opacity: 1;
    transform: translate(-50%, 0);
}
.gn-busy .gn-spinner { flex: 0 0 auto; }
.gn-busy-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gn-busy-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--gn-z-guide);
    height: 0.1875rem;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}
.gn-busy-bar.gn-busy-on { opacity: 1; }
.gn-busy-bar::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 40%;
    background: var(--gn-color-accent);
    border-radius: var(--gn-radius-pill);
    animation: gn-busy-slide 1.2s ease-in-out infinite;
}
@keyframes gn-busy-slide {
    from { transform: translateX(-100%); }
    to { transform: translateX(250%); }
}

/* lock — 한 요소만 비활성하고 글자 앞에 작은 스피너 */
.gn-busy-lock::before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: var(--gn-space-2);
    vertical-align: -0.1875rem;
    border: 0.125rem solid currentColor;
    border-top-color: transparent;
    border-radius: var(--gn-radius-circle);
    opacity: 0.7;
    animation: gn-spin 0.7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .gn-busy-bar::before { animation: none; width: 100%; opacity: 0.6; }
    .gn-busy-lock::before { animation-duration: 2s; }
}
