/* ========================================
   DCR - Base Application Styles
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.5;
    color: #1a1a1a;
    background: #f8f7f4;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid #0d4f4f;
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: rgba(13, 79, 79, 0.2);
    color: #0d4f4f;
}

/* Links */
a {
    color: #0d4f4f;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Buttons */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Main content wrapper */
.page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    width: 100%;
}

/* Utility classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Blazor specific */
#blazor-error-ui {
    background: #ffcdd2;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.1);
    display: none;
    left: 0;
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #ffcdd2;
    padding: 1rem;
    border-radius: 8px;
}

.blazor-error-boundary::after {
    content: "Ein Fehler ist aufgetreten.";
    display: block;
    font-weight: 600;
}

/* Loading indicator */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.loading::after {
    content: "";
    width: 32px;
    height: 32px;
    border: 3px solid #e5e5e5;
    border-top-color: #0d4f4f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
