/* MailNuts Web App Styles */

/* Loading screen */
.loading-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background, #1e1e2e);
}

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

.loading-logo {
    width: 64px;
    height: 64px;
    color: var(--primary, #89b4fa);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-text {
    font-size: 1rem;
    color: var(--text-secondary, #a6adc8);
    font-weight: 500;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border, #313244);
    border-top-color: var(--primary, #89b4fa);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Blazor error UI */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: var(--error, #f38ba8);
    color: white;
    text-align: center;
    font-size: 0.875rem;
    z-index: 9999;
}

#blazor-error-ui .reload,
#blazor-error-ui .dismiss {
    color: white;
    text-decoration: underline;
    margin-left: 0.5rem;
    cursor: pointer;
}

/* Valid submitting overlay */
.valid.modified ~ .validation-message {
    color: var(--success, #a6e3a1);
}

.invalid ~ .validation-message {
    color: var(--error, #f38ba8);
}

/* Hide Blazor reconnection UI */
#components-reconnect-modal {
    display: none !important;
}
