html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}


a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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 {
    color: var(--bs-secondary-color);
    text-align: end;
}

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

/*denser ui (less padding)*/
.mud-input > input.mud-input-root-outlined, .mud-input-slot {
    padding: 10px !important;
}

.mud-input-label {
    transform: translate(14px, 12px) scale(1) !important;
}

/* Override when .mud-shrink sibling exists */
.mud-shrink ~ .mud-input-label, .mud-input:focus-within ~ label.mud-input-label {
    transform: translate(14px, -6px) scale(0.75) !important;
    color: var(--mud-palette-text-secondary) !important;
}


.mud-table-cell {
    padding: 2px 16px 2px 16px !important;
}

.mud-breadcrumb-item:not(.mud-disabled) > a {
    color: var(--mud-palette-white) !important;
}
.mud-breadcrumb-item.mud-disabled > a {
    color: rgb(225, 225, 225) !important;
}


/* ===== Change Tracking Styling (Orange borders for modified fields) ===== */
/* NOTE: Must come BEFORE .field-error so validation errors take priority */
/* Uses a brighter orange (#ed6c02) for visibility on white backgrounds,
   separate from the WCAG-compliant dark warning color used for chips/buttons */

:root {
    --field-changed-color: #ed6c02;  /* Material orange 700 - visible on white */
}

/* TextField outline */
.field-changed .mud-input-outlined fieldset {
    border-color: var(--field-changed-color) !important;
}

.field-changed .mud-input-outlined:hover fieldset {
    border-color: var(--field-changed-color) !important;
}

/* Select outline */
.field-changed .mud-select .mud-input-outlined fieldset {
    border-color: var(--field-changed-color) !important;
}

.field-changed .mud-select .mud-input-outlined:hover fieldset {
    border-color: var(--field-changed-color) !important;
}

/* DatePicker outline */
.field-changed .mud-picker .mud-input-outlined fieldset {
    border-color: var(--field-changed-color) !important;
}

.field-changed .mud-picker .mud-input-outlined:hover fieldset {
    border-color: var(--field-changed-color) !important;
}

/* Text color */
.field-changed .mud-input-slot {
    color: var(--field-changed-color) !important;
}

.field-changed .mud-select-input {
    color: var(--field-changed-color) !important;
}

/* Label color */
.field-changed .mud-input-label {
    color: var(--field-changed-color) !important;
}

/* Checkbox styling */
.field-changed .mud-checkbox .mud-button-label {
    color: var(--field-changed-color) !important;
}

.field-changed .mud-checkbox .mud-icon-root {
    color: var(--field-changed-color) !important;
}

/* ===== Validation Error Styling (Red borders for validation errors) ===== */
/* NOTE: Must come AFTER .field-changed to override and take priority */

/* TextField outline */
.field-error .mud-input-outlined fieldset {
    border-color: var(--mud-palette-error) !important;
}

.field-error .mud-input-outlined:hover fieldset {
    border-color: var(--mud-palette-error) !important;
}

/* Select outline */
.field-error .mud-select .mud-input-outlined fieldset {
    border-color: var(--mud-palette-error) !important;
}

.field-error .mud-select .mud-input-outlined:hover fieldset {
    border-color: var(--mud-palette-error) !important;
}

/* DatePicker outline */
.field-error .mud-picker .mud-input-outlined fieldset {
    border-color: var(--mud-palette-error) !important;
}

.field-error .mud-picker .mud-input-outlined:hover fieldset {
    border-color: var(--mud-palette-error) !important;
}

/* Label color */
.field-error .mud-input-label {
    color: var(--mud-palette-error) !important;
}

/* Text color */
.field-error .mud-input-slot {
    color: var(--mud-palette-error) !important;
}

.field-error .mud-select-input {
    color: var(--mud-palette-error) !important;
}

/* Checkbox styling */
.field-error .mud-checkbox .mud-button-label {
    color: var(--mud-palette-error) !important;
}

.field-error .mud-checkbox .mud-icon-root {
    color: var(--mud-palette-error) !important;
}

/* ===== Dialog Utility Classes ===== */

/* Scrollable content wrapper for dialog content areas */
.dialog-content-wrapper {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

/* Consistent button layout for dialog actions */
.dialog-button-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 8px;
}

/* Group Reset and Cancel buttons on the left side */
.dialog-button-group-left {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Proper spacing for dialog titles with icons */
.dialog-title-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Resizable Textarea & Fullscreen Editor ===== */

.resizable-textarea textarea {
    resize: vertical;
    max-height: 500px;
    font-size: 14px;
    line-height: 1.65;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
    margin-top: 4px;
}


/* ===== Skip Link for Accessibility (WCAG 2.1 SC 2.4.1) ===== */
/*
 * PURPOSE: Allows keyboard users to skip repetitive navigation and jump
 * directly to the main content. Required for WCAG 2.1 Level A compliance.
 *
 * HOW IT WORKS:
 * 1. The link is visually hidden off-screen (top: -40px) by default
 * 2. When a keyboard user presses Tab, the link receives focus
 * 3. On focus, the link slides into view (top: 0) so the user can see it
 * 4. Pressing Enter jumps to the #main-content element
 * 5. Sighted mouse users never see it (they don't Tab through the page)
 *
 * WHY IT'S NEEDED:
 * - Screen reader users would otherwise have to listen to the entire
 *   navigation menu on every page load before reaching content
 * - Keyboard-only users would have to Tab through many links repeatedly
 *
 * TESTING: Press Tab immediately after page load - the link should appear
 */
.skip-link {
    position: absolute;
    top: -40px;                              /* Hidden above viewport */
    left: 0;
    background: var(--mud-palette-primary);
    color: white;
    padding: 8px 16px;
    z-index: 9999;                           /* Above all other content */
    text-decoration: none;
    font-weight: 500;
    border-radius: 0 0 4px 0;
    transition: top 0.2s;                    /* Smooth slide-in animation */
}

.skip-link:focus {
    top: 0;                                  /* Slides into view when focused */
    outline: 2px solid var(--mud-palette-primary-darken);
    outline-offset: 2px;                     /* Visible focus indicator */
}

/* Hide focus ring on main content (it's programmatically focused, not tabbed to) */
#main-content:focus {
    outline: none;
}

/* ===== Visually Hidden (Screen Reader Only) ===== */
/*
 * PURPOSE: Hide content visually while keeping it accessible to screen readers.
 * Use for text that provides context to assistive technology users but would
 * be redundant or confusing for sighted users.
 *
 * EXAMPLES:
 * - Search hints ("Press Enter to search")
 * - Loading state announcements
 * - Additional context for icon-only buttons
 */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Additional Information Card Layout ===== */

.info-cards-list {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
    flex: 1;
}

.info-cards-list::-webkit-scrollbar { width: 5px; }
.info-cards-list::-webkit-scrollbar-track { background: transparent; }
.info-cards-list::-webkit-scrollbar-thumb { background: var(--mud-palette-table-lines); border-radius: 10px; }

.info-card-text {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.info-card-text.collapsed {
    max-height: 100px;
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.info-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 0;
    border: none;
    background: none;
    color: var(--mud-palette-primary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.12s;
}

.info-expand-btn:hover {
    color: var(--mud-palette-primary-darken);
}

.info-panel-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 4px 8px;
    border-top: 1px solid var(--mud-palette-table-lines);
}

.info-pagination-left {
    display: flex;
    align-items: center;
    gap: 4px;
}

.info-pagination-label {
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

.info-page-size-select {
    width: 60px;
}

.info-page-size-select .mud-input {
    font-size: 13px;
}

.info-pagination-right {
    display: flex;
    align-items: center;
    gap: 0;
}

.info-pagination-info {
    font-size: 13px;
    color: var(--mud-palette-text-secondary);
    margin-right: 4px;
    white-space: nowrap;
}

.info-empty-state {
    text-align: center;
    padding: 40px 24px;
    color: var(--mud-palette-text-secondary);
}

.info-empty-state p {
    font-size: 13px;
    margin-top: 8px;
}


/* ===== .NET SDK 10.0.100 Hot Reload Bug Workaround ===== */
/* See: https://github.com/dotnet/sdk/issues/51825
 * Bug causes empty gray overlay to appear during hot reload.
 * This hides the overlay when it contains no error content.
 */
#dotnet-compile-error:empty {
    visibility: hidden;
    display: none;
}
