.rounded-datagrid {
    border-radius: 12px; /* adjust as needed */
    overflow: hidden; /* ensures corners are clipped properly */
    /* border: 1px solid #dee2e6; */ /* optional: a border like Bootstrap tables */
}

.b-datagrid thead tr th {
    background-color: var(--datagrid-header-background-color, #FFFFFF);
    color: var(--datagrid-header-color, #000000);
}

.data-entry-buttons {
    /*width: 100%;
    justify-content: center;*/
    padding: 1rem;
    border-radius: 10px;
    background-color: var(--data-entry-buttons-background-color, #FFFFFF);
}

.data-entry-fields {
    /*max-height: calc(100vh - 210px);
    overflow-y: auto;*/
    padding: 1rem;
    border-radius: 10px;
    background-color: var(--data-entry-fields-background-color, #FFFFFF);
}


/* Modal header styles */
.modal.show.custom-modal-primary .modal-content .modal-header {
    background-color: var(--bs-primary, #FFFFFF) !important;
    /*color: white !important;*/
    color: black !important;
    font-size: 1.5rem !important;
    padding: 1rem !important;
    text-align: center !important;
}


.modal.show.custom-modal-light .modal-content .modal-header {
    background-color: var(--bs-light, #FFFFFF) !important;
    /*color: white !important;*/
    color: black !important;
    font-size: 1.5rem !important;
    padding: 1rem !important;
    text-align: center !important;
}


.modal.show.custom-modal-dark .modal-content .modal-header {
    background-color: var(--bs-dark, #FFFFFF) !important;
    color: white !important;
    font-size: 1.5rem !important;
    padding: 1rem !important;
    text-align: center !important;
}

.modal.show.custom-modal-dark .modal-content .modal-header .btn-close {
    background-image: url('data:image/svg+xml,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%23ffffff"%3e%3cpath d="M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z"/%3e%3c/svg%3e') !important;
}


/*.modal.show.custom-modal .modal-content .modal-header {*/
    /*background-color: #003366 !important;*/
    /*background-color: var(--modal-header-background-color) !important;
    color: var(--modal-header-color) !important;
    font-size: 1.5rem !important;
    padding: 1rem !important;
    text-align: center !important;
}

.modal.show.custom-modal .modal-content .modal-body {
    background-color: var(--modal-body-background-color) !important;
}*/

.modal.show.custom-modal .modal-content {
    border-radius: 12px !important;
    overflow: hidden !important;
    background-color: var(--modal-body-background-color, #FFFFFF) !important;
}

    .modal.show.custom-modal .modal-content .modal-header {
        background-color: var(--modal-header-background-color, #FFFFFF) !important;
        color: var(--modal-header-color, #000000) !important;
        font-size: 1.5rem !important;
        padding: 1rem !important;
        text-align: center !important;
    }

    .modal.show.custom-modal .modal-content .modal-body {
        background-color: transparent !important; /* or match the container */
    }

/*
** Really probably just need this instead of all the other stuff below for .btn-close.
**
.modal.show.custom-modal .modal-content .modal-header .btn-close {
    background-image: var(--modal-btn-close-background-image) !important;
}
*/

/* Reset and style the close button */
.modal.show.custom-modal .modal-content .modal-header .btn-close {
    color: transparent !important; /* Hide text (if any) */
    background: transparent !important; /* Make background transparent */
    border: none !important; /* Remove any border */
    /*font-size: 2rem !important;*/ /* Increase font size for better visibility */
    opacity: 1 !important; /* Ensure the button is visible */
    padding: 1rem !important; /* Add more padding around the button */
    width: auto !important; /* Ensure button size fits */
    height: auto !important; /* Ensure button size fits */
    display: inline-block !important; /* Ensure it is displayed */
}

/* Target the button's background-image and modify the SVG fill */
    .modal.show.custom-modal .modal-content .modal-header .btn-close {
        background-image: var(--modal-btn-close-background-image, url('data:image/svg+xml,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%23000"%3e%3cpath d="M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z"/%3e%3c/svg%3e')) !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: 1.5rem !important; /* Increase icon size */
    }

/* Optional: Add hover effect for the close button */
.modal.show.custom-modal .modal-content .modal-header .btn-close:hover {
    opacity: 0.8 !important;
}



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

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

.btn-primary {
    color: #ffffff !important;
    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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUw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
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}
.active-item {
    background-color: white !important;
    /* color: #212529; */
    border: 1px solid #86b7fe !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.05) !important;
    overflow: hidden !important;
    text-decoration-color: white !important;
}

    .active-item a:hover {
        color: white !important;

        background-color: #86b7fe !important;
        border: 1px solid #86b7fe !important;
        border-radius: 12px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,.05) !important;
        overflow: hidden !important;
        text-decoration-color: white !important;
    }

    .active-item:hover {
        background-color: #86b7fe !important;
        border: 1px solid #86b7fe !important;
        border-radius: 12px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,.05) !important;
        overflow: hidden !important;
        text-decoration-color: white !important;
    }

.normal-item {
    background-color: transparent !important;
    overflow: hidden !important;
}

    .normal-item:hover {
        background-color: #86b7fe !important;
        border: 1px solid #86b7fe !important;
        border-radius: 12px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,.05) !important;
        overflow: hidden !important;
        text-decoration-color: white !important;
        color: white !important;
    }

    .normal-item a:hover {
        color: white !important;

        background-color: #86b7fe !important;
        border: 1px solid #86b7fe !important;
        border-radius: 12px !important;
        box-shadow: 0 1px 2px rgba(0,0,0,.05) !important;
        overflow: hidden !important;
        text-decoration-color: white !important;
    }

/* Header user avatar (LoginDisplay.razor).
   .chat-avatar is also defined in Chat.css, which is only loaded by some pages, so the base look is repeated here. */
.chat-avatar {
    width: 30px;
    height: 30px;
    background-color: var(--theme-primary-color, purple); /* Blazorise theme Primary, set by BuildCssVariables in App.razor */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 16px;
    user-select: none;
}

/* Toggle button of the avatar menu, the circle itself comes from .chat-avatar. */
.login-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.chat-avatar.login-avatar-button {
    padding: 0;
    border: 0;
    cursor: pointer;
    line-height: 1;
}

    .chat-avatar.login-avatar-button:hover,
    .chat-avatar.login-avatar-button:focus-visible {
        opacity: 0.85;
    }

/* Transparent layer that closes the menu when anything outside of it is clicked. */
.login-avatar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
}

/* Opens below the avatar and towards the left so it does not run off the right edge of the screen. */
.login-avatar-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1060;
    min-width: 12rem;
    padding: 0.5rem 0;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.login-avatar-item {
    display: block;
    width: 100%;
    padding: 0.4rem 1rem;
    background: none;
    border: 0;
    color: #212529;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

    .login-avatar-item:hover,
    .login-avatar-item:focus-visible {
        background-color: #f1f3f5;
        color: #212529;
    }

.login-avatar-divider {
    height: 0;
    margin: 0.5rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

/* Notifications icon and list (NotificationsDisplay.razor). */
.notifications-display {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Transparent layer that closes the list when anything outside of it is clicked. */
.notifications-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
}

/* Opens below the icon and towards the left so it does not run off the right edge of the screen. */
.notifications-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1060;
    width: 22rem;
    max-width: 90vw;
    max-height: 70vh;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.notifications-header {
    padding: 0.6rem 1rem;
    font-weight: bold;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.notifications-empty {
    padding: 1rem;
    color: #6c757d;
    font-weight: normal;
}

.notifications-item {
    padding: 0.6rem 1rem;
    font-weight: normal;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

    .notifications-item:last-child {
        border-bottom: 0;
    }

.notifications-item-title {
    font-weight: bold;
}

.notifications-item-when {
    color: #6c757d;
    font-size: 0.8rem;
}
