/*
 * Utility Components
 * Common utility styles for loading, spinners, and overlays
 */

/* ========================================
   Loading Spinner
   ======================================== */

.loading-spinner {
    display: none;
}

.htmx-request .loading-spinner {
    display: inline-block;
}

.spinner-border-sm {
    width: 0.75rem;
    height: 0.75rem;
}

/* ========================================
   Loading Overlay
   ======================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
}

.loading-content {
    text-align: center;
    background: rgba(0, 0, 0, 0.9);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.loading-overlay .progress {
    background-color: rgba(255, 255, 255, 0.2);
}

.loading-overlay .progress-bar {
    background: linear-gradient(45deg, #007bff, #0056b3);
}

/* ========================================
   Alert Components (Dark Mode Support)
   ======================================== */

/* Alert 기본 스타일 개선 */
.alert {
    border-radius: var(--border-radius-md);
    border-width: 1px;
    padding: 1rem 1.25rem;
    transition: all 0.3s var(--ease-in-out);
}

.alert i {
    font-size: 1.1rem;
}

/* 다크모드 Alert 스타일 */
[data-bs-theme="dark"] .alert-info {
    background-color: rgba(13, 110, 253, 0.15);
    border-color: rgba(13, 110, 253, 0.3);
    color: #9ec5fe;
}

[data-bs-theme="dark"] .alert-success {
    background-color: rgba(25, 135, 84, 0.15);
    border-color: rgba(25, 135, 84, 0.3);
    color: #75b798;
}

[data-bs-theme="dark"] .alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
    color: #ffda6a;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
    color: #ea868f;
}
