/* TekLive SPA - Browser Styles */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #faf9f7;
    color: #1a1a2e;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    width: 100dvw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Force Avalonia's canvas/host to fill the entire viewport */
#app > canvas,
#app > div {
    flex: 1 1 auto;
    min-height: 0;
    height: 100% !important;
    width: 100% !important;
}

#blazor-error-ui {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 16px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    display: none;
}

#blazor-error-ui.visible {
    display: flex;
}

#blazor-error-ui .reload {
    color: #435ca7;
    text-decoration: underline;
    cursor: pointer;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    font-size: 18px;
    opacity: 0.7;
}

#blazor-error-ui .dismiss:hover {
    opacity: 1;
}

/* Loading state */
#app:not(.avalonia-ready)::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #435ca7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Smooth transitions for page changes */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #435ca7;
    outline-offset: 2px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f0eb;
}

::-webkit-scrollbar-thumb {
    background: #c9c0b5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #435ca7;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #c9c0b5 #f1f0eb;
}