/*전역 로딩바 스타일*/
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.loading-fade-in {
    opacity: 1;
    visibility: visible;
}

.loading-overlay.loading-fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #00A287;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 로딩 메시지 스타일 */
.loading-message {
    color: white;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    margin-top: 10px;
}

/* 버튼 로딩 상태 */
.krds-btn.loading {
    position: relative;
    color: transparent !important;
}

.krds-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 테이블 로딩 상태 */
.table-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.table-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00A287;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

/* 인라인 로딩 스피너 */
.loading-inline {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #00A287;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
