/* Loading and empty states - Spinners, error messages, and empty state UI */
/* Requires: shared-animations.css for spinner-rotate, fadeIn, fadeInTop */

/* Generic loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s ease;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
}

/* Loading error state */
.loading-error {
    width: 100%;
    padding: 2rem;
    text-align: center;
    grid-column: 1 / -1;
    animation: fadeIn 0.3s ease;
}

.error-message {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.error-message p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Empty state styling */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin: 2rem auto;
    max-width: 500px;
    box-shadow: var(--shadow);
    animation: fadeIn 0.3s ease;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    opacity: 0.5;
    transition: all var(--transition-smooth);
}

.empty-state:hover i {
    opacity: 0.7;
    transform: translateY(-2px);
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
}

/* Dark theme adjustments for empty state */
[data-theme="dark"] .empty-state {
    background-color: var(--surface);
    border-color: var(--border);
}

[data-theme="dark"] .empty-state i {
    color: var(--text-secondary);
}

/* No content message */
.no-content {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 1rem;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: -22rem;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    width: auto;
    min-width: 300px;
    animation: fadeInTop 0.3s ease-out;
}
