/* ============================================= */
/* SafetyTraining - Theme & Base Styles         */
/* Basis-Stile und MudBlazor-Erweiterungen      */
/* ============================================= */
/* HINWEIS: CSS-Variablen werden dynamisch aus  */
/* SafetyTrainingTheme.cs generiert (App.razor) */
/* ============================================= */

/* ==================== */
/* CSS Reset & Box Sizing */
/* ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

/* ==================== */
/* Base Element Styles */
/* ==================== */
html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== */
/* Typography */
/* ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin: 0 0 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

/* ==================== */
/* MudBlazor Overrides */
/* ==================== */

/* Full Height Layout */
.mud-layout {
    height: 100vh;
    overflow: hidden;
}

.mud-main-content {
    height: calc(100vh - 0px); /* Account for dense AppBar */
    overflow: auto;
}

/* ==================== */
/* Scrollbar Styling */
/* ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ==================== */
/* Selection */
/* ==================== */
::selection {
    background: var(--primary-light);
    color: var(--white);
}

/* ==================== */
/* Focus Styles */
/* ==================== */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ==================== */
/* Blazor Error UI */
/* ==================== */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: var(--z-toast);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
