/* Global Font Definition */
html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
    scroll-padding-top: 5rem; /* Match navbar height + 1*/
}

body {
    padding-top: 4rem; /* Push content below fixed navbar */
    min-height: 100vh;
    background: #e5e5e5;
}

/* Global CSS Variables */
:root {
    /* Navbar and Content Viewport */
    --navbar-height: 4rem;
    --content-height: calc(100vh - var(--navbar-height));
    --max-width: 112rem;
    
    /* Primary Colors */
    --color-primary: #8b5cf6;
    --color-primary-hue: #a78bfa;
    --color-primary-dark: #7c3aed;
    --color-primary-light: #faf5ff;
    --color-primary-lighter: #f3f4f6;

    /* Text Colors */
    --color-text-primary: #111827;
    --color-text-secondary: #374151;
    --color-text-muted: #6b7280;
    --color-text-light: #9ca3af;

    /* Border Colors */
    --color-border: #d1d5db;
    --color-border-light: #e5e7eb;
    --color-border-lighter: #f3f4f6;

    /* Background Colors */
    --color-bg-white: #f2f2f2;
    --color-bg-light: #e8e8e8;
    --color-bg-lighter: #ebebeb;
    --color-bg-lightest: #e5e5e5;

    /* Control/Interactive Element Backgrounds */
    --color-control-bg: #ffffff;

    /* State Colors */
    --color-error: #dc2626;
    --color-success: #26b050;
    --color-warning: #d97706;

    /* Shadows */
    --shadow-focus-primary: 0 0 0 3px rgba(139, 92, 246, 0.1);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-card-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-overlay: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Common Gradients */
    --gradient-page-bg: #e5e5e5;
    --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #6b21a8 100%);
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--color-success);
}

.invalid {
    outline: 1px solid var(--color-error);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0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.animated-visibility{
    opacity: 0;
    display: none;
    transition: all 0.2s ease;
    transition-behavior: allow-discrete;
}
.animated-visibility--visible{
    opacity: 1;
    display: flex;
}

@starting-style {
    .animated-visibility--visible {
        opacity: 0;
    }
}

/* MudDialog Global Styles - matching project design */
.mud-dialog {
    border-radius: 0.5rem !important;
    max-width: calc(100vw - 0.5rem) !important;
    max-height: calc(100vh - 0.5rem) !important;
    box-shadow: var(--shadow-overlay) !important;
    min-width: min(23rem, calc(100vw - 0.5rem));
}

.mud-dialog-title {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: var(--color-text-primary) !important;
    padding: 1rem 1rem 1rem !important;
    border-bottom: 1px solid var(--color-border-light) !important;
}

.mud-dialog .mud-dialog-content{
    padding: 0 9px !important;
}

.dialog-backdrop {
    backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, 0.5) !important;
}

/* Override MudBlazor default styles */
.mud-dialog .mud-dialog-content {
    overflow-y: visible !important;
}

.mud-button-text {
    text-transform: none !important;
}

/* Close button styling */
.mud-dialog-close-button {
    color: var(--color-text-muted) !important;
    transition: color 0.2s ease;
}

.mud-dialog-close-button:hover {
    color: var(--color-text-primary) !important;
    background: transparent !important;
}