yh1: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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1zbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+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;
}

/* Input field padding adjustments - More compact fields */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="search"],
select,
textarea {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

/* Override Tailwind py-2.5 and px-3 with more compact values */
.py-2\.5 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.px-3 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

/* Ensure py-1.5 also gets adjusted for consistency */
.py-1\.5 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* Toast Container z-index fix */
.blazored-toast-container {
    z-index: 9999 !important;
}

/* Ensure toasts appear above all other elements */
.blazored-toast {
    z-index: 10000 !important;
}

/* Modal z-index fix - Ensure modals appear above sidebar (z-50) */
.blazored-modal-container {
    z-index: 9999 !important;
}

.blazored-modal {
    z-index: 10000 !important;
}

.blazored-modal-overlay {
    z-index: 9998 !important;
}

/* AutoComplete Select Dropdown improvements */
.autocomplete-dropdown-portal {
    position: fixed !important;
    z-index: 9999 !important;
    pointer-events: none;
}

    .autocomplete-dropdown-portal > * {
        pointer-events: auto;
    }

/* Prevent overflow issues in containers */
.autocomplete-container {
    position: relative;
    z-index: 1;
}

/* Ensure dropdowns render above form sections */
.form-section {
    position: relative;
    z-index: auto;
}

/* Specific override for container elements that might clip dropdowns */
.overflow-hidden .autocomplete-dropdown-portal,
.overflow-auto .autocomplete-dropdown-portal,
.overflow-scroll .autocomplete-dropdown-portal {
    position: fixed !important;
    z-index: 9999 !important;
}

/* Global fixes for iOS Safari - Critical for touch events */
* {
    -webkit-tap-highlight-color: transparent;
}

/* iOS Safari specific fixes for touch events and clickable elements */
button,
[role="button"],
[type="button"],
a,
label,
input,
select,
textarea,
[onclick] {
    cursor: pointer !important;
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    /* Force hardware acceleration on iOS */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

/* Specific fix for buttons on iOS */
button,
[role="button"],
[type="button"] {
    /* Remove iOS default button styling */
    -webkit-appearance: none;
    appearance: none;
    /* Ensure buttons are touchable */
    pointer-events: auto !important;
}

    /* Force all interactive elements to be touchable */
    button *,
    [role="button"] *,
    [type="button"] * {
        pointer-events: none !important;
    }

button,
[role="button"],
[type="button"] {
    pointer-events: auto !important;
}

/* iOS-specific styles using feature detection */
@supports (-webkit-touch-callout: none) {
    /* This only applies to iOS Safari */
    /* Fix for iOS Safari click events on buttons and interactive elements */
    button,
    [role="button"],
    [type="button"],
    a,
    label,
    input,
    select,
    textarea {
        /* Critical: prevent iOS from blocking touch events */
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-user-select: none;
        user-select: none;
        /* Remove any potential touch delay */
        touch-action: manipulation;
        /* Force rendering layer */
        will-change: transform;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    /* Ensure dropdown menus and modals work properly on iOS */
    [role="menu"],
    [role="menuitem"],
    [role="dialog"],
    [class*="menu"],
    [class*="dropdown"] {
        -webkit-overflow-scrolling: touch;
        touch-action: manipulation;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    /* Fix for absolutely positioned elements in iOS */
    .absolute,
    [class*="absolute"],
    [style*="position: absolute"],
    [style*="position:absolute"] {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }
    /* Improve scrolling on iOS */
    .overflow-y-auto,
    .overflow-auto,
    [style*="overflow-y: auto"],
    [style*="overflow: auto"] {
        -webkit-overflow-scrolling: touch;
    }
    /* Fix z-index issues on iOS */
    [class*="z-"],
    [style*="z-index"] {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Additional iOS WebKit specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    /* Only for WebKit browsers (Safari) */
    select,
    textarea,
    input {
        font-size: 16px !important; /* Prevent zoom on focus in iOS */
    }
}