@import url('tokens.css');
/**
 * Copyright (c) 2025 AInvirion. All Rights Reserved.
 *
 * PROPRIETARY AND CONFIDENTIAL
 *
 * This source code is the proprietary and confidential property of AInvirion.
 * Unauthorized copying, modification, distribution, or use of this file,
 * via any medium, is strictly prohibited without written permission from AInvirion.
 */


/* Typography — apply design system fonts */
body {
    font-family: var(--font-body);
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
}

/* Smooth theme transitions — scoped to interactive elements */
.sidebar-link,
.btn,
button,
a,
input,
select,
textarea {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Card hover effects */
.card-hover {
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.card-hover:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Progress bar animation */
.progress-bar {
    transition: width 0.5s ease;
}

/* Staggered entrance animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-1 { animation: slideUp 0.4s var(--ease-out) both; }
.stagger-2 { animation: slideUp 0.4s var(--ease-out) both; animation-delay: 50ms; }
.stagger-3 { animation: slideUp 0.4s var(--ease-out) both; animation-delay: 100ms; }
.stagger-4 { animation: slideUp 0.4s var(--ease-out) both; animation-delay: 150ms; }
.stagger-5 { animation: slideUp 0.4s var(--ease-out) both; animation-delay: 200ms; }
.stagger-6 { animation: slideUp 0.4s var(--ease-out) both; animation-delay: 250ms; }

@media (prefers-reduced-motion: reduce) {
    .stagger-1, .stagger-2, .stagger-3,
    .stagger-4, .stagger-5, .stagger-6 {
        animation: none;
    }
}

/* Loading spinner */
.spinner {
    border: 3px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}
.dark .spinner {
    border-color: var(--border-strong);
    border-top-color: var(--accent);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-completed {
    background-color: var(--success-soft);
    color: var(--success-text);
}
.status-failed {
    background-color: var(--error-soft);
    color: var(--error);
}

.status-processing {
    background-color: var(--accent-soft);
    color: var(--accent);
}

/* Sidebar wordmark — invert in dark mode since SVG has hardcoded gray fill */
.sidebar-wordmark {
    display: block;
}
[data-theme="dark"] .sidebar-wordmark {
    filter: brightness(2.5);
}

/* Sidebar — token-based colors (sidebar.js uses these classes instead of Tailwind) */
.sidebar-surface {
    background-color: var(--surface);
}
.sidebar-border {
    border-right: 1px solid var(--border);
}
.sidebar-border-color {
    border-color: var(--border);
}
.sidebar-text-primary {
    color: var(--text);
}
.sidebar-link-inactive {
    color: var(--text-secondary);
}
.sidebar-icon {
    color: var(--text-secondary);
}
.sidebar-icon-muted {
    color: var(--text-muted);
}
.sidebar-btn-hover:hover {
    background-color: var(--surface-alt);
}

/* Sidebar active link */
.sidebar-link-active {
    background-color: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

/* Sidebar link hover & focus */
.sidebar-link:hover {
    background-color: var(--surface-alt);
}
.sidebar-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    border-radius: 0.5rem;
}

/* Screen-reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip link */
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
.skip-link:focus {
    position: fixed;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    top: 1rem;
    left: 1rem;
    z-index: 100;
    background-color: var(--accent);
    color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    font-size: 0.875rem;
    font-weight: 500;
}

/* i18n FOUC prevention — hide translatable elements until translations load (non-English only) */
html.i18n-loading [data-i18n],
html.i18n-loading [data-i18n-placeholder],
html.i18n-loading [data-i18n-html] {
    visibility: hidden;
}
