/* HTMX 로딩 인디케이터 스타일 */

/* 기본 인디케이터 - 숨김 상태 */
.htmx-indicator {
    display: none;
    transition: opacity 200ms ease-in;
}

/* HTMX 요청 중일 때 인디케이터 표시 */
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-block;
    opacity: 1;
}

/* 스피너 스타일 */
.spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-sm {
    width: 0.75em;
    height: 0.75em;
    border-width: 1.5px;
}

.spinner-lg {
    width: 1.5em;
    height: 1.5em;
    border-width: 3px;
}

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

/* 버튼 로딩 상태 */
button[disabled].loading {
    cursor: not-allowed;
    opacity: 0.7;
}

/* 인라인 로딩 텍스트 */
.loading-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* 오버레이 로딩 */
.loading-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* 페이지 전체 로딩 */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* 점 애니메이션 (로딩 중...) */
.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Tailwind와 호환되는 유틸리티 클래스 */
.htmx-settling {
    transition: opacity 300ms ease-out;
}

.htmx-swapping {
    opacity: 0;
    transition: opacity 300ms ease-out;
}