#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

:root {
    font-size: var(--rz-root-font-size);
    --rz-white: #ffffff;
    --rz-black: #000000;
    --rz-base-50: #fafafa;
    --rz-base-100: #f5f5f5;
    --rz-base-200: #eeeeee;
    --rz-base-300: #e0e0e0;
    --rz-base-400: #bdbdbd;
    --rz-base-500: #9e9e9e;
    --rz-base-600: #757575;
    --rz-base-700: #616161;
    --rz-base-800: #424242;
    --rz-base-900: #212121;
    --rz-primary: #2196f3;
    --rz-primary-light: #4dabf5;
    --rz-primary-lighter: rgba(33, 150, 243, 0.12);
    --rz-primary-dark: #1a78c2;
    --rz-primary-darker: #1666a5;
    --rz-secondary: #8bc34a;
    --rz-secondary-light: #add581;
    --rz-secondary-lighter: rgba(139, 195, 74, 0.12);
    --rz-secondary-dark: #679f38;
    --rz-secondary-darker: #32691e;
    --rz-info: #2196f3;
    --rz-info-light: #64b5f6;
    --rz-info-lighter: rgba(30, 147, 243, 0.2);
    --rz-info-dark: #1565c0;
    --rz-info-darker: #0d47a1;
    --rz-success: #4caf50;
    --rz-success-light: #81c784;
    --rz-success-lighter: rgba(76, 175, 79, 0.2);
    --rz-success-dark: #2e7d31;
    --rz-success-darker: #1b5e20;
    --rz-warning: #ff9800;
    --rz-warning-light: #ffb74d;
    --rz-warning-lighter: rgba(255, 152, 0, 0.2);
    --rz-warning-dark: #f57c00;
    --rz-warning-darker: #e65100;
    --rz-danger: #f44336;
    --rz-danger-light: #e57272;
    --rz-danger-lighter: rgba(244, 67, 54, 0.2);
    --rz-danger-dark: #d32f2f;
    --rz-danger-darker: #b71b1b;
    --rz-on-primary: #ffffff;
    --rz-on-primary-lighter: #2196f3;
    --rz-on-primary-light: #ffffff;
    --rz-on-primary-dark: #ffffff;
    --rz-on-primary-darker: #ffffff;
    --rz-on-secondary: #ffffff;
    --rz-on-secondary-lighter: #8bc34a;
    --rz-on-secondary-light: #ffffff;
    --rz-on-secondary-dark: #ffffff;
    --rz-on-secondary-darker: #ffffff;
    --rz-on-info: #ffffff;
    --rz-on-info-lighter: #2196f3;
    --rz-on-info-light: #ffffff;
    --rz-on-info-dark: #ffffff;
    --rz-on-info-darker: #ffffff;
    --rz-on-success: #ffffff;
    --rz-on-success-lighter: #4caf50;
    --rz-on-success-light: #ffffff;
    --rz-on-success-dark: #ffffff;
    --rz-on-success-darker: #ffffff;
    --rz-on-warning: #ffffff;
    --rz-on-warning-lighter: #ff9800;
    --rz-on-warning-light: #ffffff;
    --rz-on-warning-dark: #ffffff;
    --rz-on-warning-darker: #ffffff;
    --rz-on-danger: #ffffff;
    --rz-on-danger-lighter: #f44336;
    --rz-on-danger-light: #ffffff;
    --rz-on-danger-dark: #ffffff;
    --rz-on-danger-darker: #ffffff;
}

body {
    font-family: var(--rz-text-font-family);
    color: var(--rz-text-color);
    font-size: var(--rz-body-font-size);
    line-height: var(--rz-body-line-height);
    background-color: var(--rz-body-background-color);
}

.rz-body {
    --rz-body-padding: 0;
}

a {
    color: var(--rz-link-color);
}

a:hover,
a:focus {
    color: var(--rz-link-hover-color);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsa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repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

.site-number-group-header {
    background-color: darkred !important;
    color: darkred !important;
    font-weight: bold !important;
}

.dt-date-group-header {
    background-color: darkred !important;
    color: darkred !important;
    font-weight: bold !important;
}

body {
    font-family: var(--rz-text-font-family);
    color: var(--rz-text-color);
    font-size: var(--rz-body-font-size);
    line-height: var(--rz-body-line-height);
}

/* Help Panel Styles */
.rz-sidebar {
    z-index: 1050 !important;
}

.help-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Help Content Formatting */
.help-content p {
    margin-bottom: 1rem;
}

.help-content h2,
.help-content h3,
.help-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.help-content ul,
.help-content ol {
    margin-bottom: 1rem;
}

.help-content table {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
}

.help-content table th,
.help-content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.help-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Responsive adjustments for help panel */
@media (max-width: 768px) {
    .rz-sidebar {
        width: 90% !important;
        max-width: 90% !important;
    }
}

/* Print styles for help content */
@media print {
    .help-content {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .help-screenshot {
        max-width: 100%;
        page-break-inside: avoid;
    }
    
    .help-section {
        page-break-inside: avoid;
    }
    
    .no-print {
        display: none !important;
    }
}

/* Field-level error highlighting for upload grid */
.field-error {
    background-color: #ffebee !important;
    border-left: 3px solid #f44336 !important;
    position: relative;
    animation: pulseError 2s ease-in-out;
}

.field-error-icon {
    color: #f44336;
    font-size: 16px;
    margin-left: 4px;
    vertical-align: middle;
}

.field-error-tooltip {
    position: absolute;
    background: #424242;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    white-space: normal;
    line-height: 1.4;
}

.field-error-tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 10px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #424242;
}

.field-error-detail {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 11px;
}

.field-error-detail strong {
    color: #ffeb3b;
}

@keyframes pulseError {
    0%, 100% {
        border-left-color: #f44336;
    }
    50% {
        border-left-color: #ff5252;
    }
}

/* Error summary panel */
.error-summary-panel {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 4px;
}

.error-summary-title {
    font-weight: 600;
    color: #e65100;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-summary-item {
    padding: 4px 0;
    font-size: 13px;
    color: #d84315;
    display: flex;
    align-items: center;
    gap: 6px;
}

.error-summary-item .rzi {
    font-size: 14px;
}

.field-name-badge {
    background: #e65100;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

/* Highlight effect when navigating to error field */
@keyframes highlightField {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: #ffeb3b;
    }
}

.field-highlight {
    animation: highlightField 1s ease-in-out 2;
}

/* ========================================
   Upload Scope Advanced - Color Coding
   ======================================== */

/* Cell color coding based on validation status */
.upload-cell-valid {
    background-color: rgba(76, 175, 80, 0.08) !important; /* Light green */
    color: #2e7d32;
}

.upload-cell-missing {
    background-color: rgba(244, 67, 54, 0.12) !important; /* Light red */
    color: #c62828;
    font-weight: 500;
}

.upload-cell-invalid {
    background-color: rgba(255, 152, 0, 0.12) !important; /* Light orange/yellow */
    color: #e65100;
    font-weight: 500;
}

.upload-cell-empty {
    background-color: rgba(158, 158, 158, 0.08) !important; /* Light gray */
    color: #616161;
    font-style: italic;
}

/* Control data columns - highlight with border */
.upload-control-data-column {
    border-left: 3px solid var(--rz-primary) !important;
    padding-left: 8px !important;
}

.upload-control-data-header {
    background-color: rgba(33, 150, 243, 0.08) !important;
    font-weight: 600 !important;
}

/* Row status indicators */
.upload-row-valid {
    border-left: 4px solid var(--rz-success) !important;
}

.upload-row-invalid {
    border-left: 4px solid var(--rz-danger) !important;
}

/* Tooltip styles for validation details */
.upload-validation-tooltip {
    max-width: 300px;
    white-space: normal;
    word-wrap: break-word;
}

/* Error cell with icon */
.upload-cell-error {
    display: flex;
    align-items: center;
    gap: 4px;
}

.upload-cell-error-icon {
    font-size: 16px;
    color: var(--rz-danger);
}

/* Field status badges */
.upload-field-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 4px;
}

.upload-field-badge-required {
    background-color: rgba(244, 67, 54, 0.15);
    color: var(--rz-danger);
}

.upload-field-badge-control {
    background-color: rgba(33, 150, 243, 0.15);
    color: var(--rz-primary);
}

/* Hover effects for invalid cells */
.upload-cell-missing:hover,
.upload-cell-invalid:hover {
    background-color: rgba(244, 67, 54, 0.18) !important;
    cursor: help;
}

/* Grid row hover enhancement */
.rz-datatable-data tr:hover .upload-cell-valid,
.rz-datatable-data tr:hover .upload-cell-missing,
.rz-datatable-data tr:hover .upload-cell-invalid {
    filter: brightness(0.95);
}
