/* Loading Components */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1.5rem;
}

.loading-state.hidden {
    display: none;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border: 3px solid var(--color-border-primary);
    border-top-color: var(--color-brand-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

.loading-text {
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

.loading-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    color: var(--color-text-muted);
}

.loading-dots {
    display: flex;
    gap: 0.25rem;
}

.loading-dot {
    width: 6px;
    height: 6px;
    background: var(--color-brand-primary);
    border-radius: var(--radius-full);
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

/* Error States */
.error-message {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid var(--color-border-error);
    color: var(--color-brand-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
}

.error-message.show {
    display: block;
}

.error-console {
    background: rgba(255, 107, 53, 0.1);
    border-top: 1px solid var(--color-border-error);
    padding: 1rem 1.5rem;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.error-console.show {
    display: block;
}

.error-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-brand-primary);
    margin-bottom: 0.5rem;
}

.error-item {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    font-family: 'Courier New', monospace;
    margin: 0.25rem 0;
}

.error-state {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-primary);
    gap: 1.5rem;
    padding: 2rem;
    text-align: center;
}

.error-state.show {
    display: flex;
}

.error-icon {
    font-size: 4rem;
}

.coming-soon {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid var(--color-border-error);
    color: var(--color-brand-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
