html, body {
    font-family: 'Inter', sans-serif;
    background: #f3f4f6;
}

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: none !important;
}

.content {
    padding-top: 0.75rem;
}

h1:focus {
    outline: none;
}

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

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

.validation-message {
    color: #e50000;
}

.bkg-gradient {
    background: var(--gradient, linear-gradient(91deg, #00ADDC 1.61%, #00A650 100%));
}

.table-fixed-header {
    border-radius: 5px;
}

.table > thead > :last-child > * {
    background: #003665;
    color: white;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxID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}

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

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

@font-face {
    font-family: 'Inter';
    src: url('/content/fonts/Inter.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}


.tag {
    color: #fff;
    padding: 4px 8px;
    border-radius: 11px;
    margin: 3px;
    display: inline-block;
    align-items: center;
    cursor: pointer;
}

table td {
    vertical-align: middle;
    align-items: center;
    align-content: center;
}

/* QuillJS custom css (Blazorise component doesn't work well atm */
.ql-size-small {
    font-size: 0.75rem;
}

.ql-size-large {
    font-size: 1.5rem;
}

.ql-size-huge {
    font-size: 2.5rem;
}

li[data-list="bullet"] {
    list-style-type: disc;
}

/* Blazorise */
.modal-body-holder {
    overflow: visible !important;
    padding-bottom: 2em;
}

.modal-title {
    text-align: center;
    overflow-wrap: anywhere;
}

.flatpickr-wrapper > input {
    cursor: pointer;
}

.flatpickr-calendar {
    user-select: none !important;
}

.flatpickr-calendar {
    min-width: 320px;
}

.flatpickr-monthDropdown-month {
    text-align: center;
}

.flatpickr-innerContainer {
    justify-content: center;
    padding-bottom: 1em;
}

/* Center hour:minute display in flatpickr time picker */
.flatpickr-time {
    justify-content: center !important;
}

.flatpickr-time .numInputWrapper {
    flex: 0 0 auto !important;
    width: 4em;
}

.flatpickr-time .flatpickr-time-separator {
    flex: 0 0 auto !important;
    width: auto;
}

/* Custom CSS */
.blazorise-validation-font-size {
    font-size: 0.875rem;
}

.blazorise-datetime-holder {
    border: 1px solid black;
    text-align: center;
}

.blazorise-preferred-modal-height {
    /*min-height: 18.75em;*/ /* min-height is not really needed, height: auto does it's job perfectly */ /* 18.75em = 300px */
    height: auto;
    max-height: calc(100vh - 15.625em); /* 15.625em = 250px */
    overflow-y: auto;
}

/* Force DataGrid tables to respect container width using fixed layout */
.table-responsive {
    width: 100%;
    max-width: 100%;
}

.table-responsive > table,
.b-datagrid table {
    table-layout: fixed;
    width: 100%;
}

/* Handle cell content overflow gracefully with ellipsis */
.b-datagrid td,
.b-datagrid th {
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

/* Fix DataGrid pager horizontal overflow - row class adds negative margins */
.b-datagrid .row,
.b-datagrid > .row,
.b-datagrid-footer .row,
.datagrid .row,
.table-responsive + .row,
.table-responsive ~ .row,
.justify-content-between.row {
    --bs-gutter-x: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.search-bar-div-holder {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 0;
    margin-bottom: 0.5em;
}

.btn-check:checked + .btn, .btn.active, .btn.show, .btn:first-child:active, :not(.btn-check) + .btn:active {
    border-color: transparent !important;
}

/* Global box-shadow removal */
*,
*::before,
*::after {
    box-shadow: none !important;
}

/* Shadow overrides for key UI elements */
[class~="dashboard-card"] {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

[class~="top-row"],
[class~="layout-holder"] {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

[class~="sidebar"] {
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.15) !important;
}

.b-bar-dropdown-menu {
    border: 1px solid #e5e7eb !important;
}

/* Fix collapsed sidebar dropdown gap: Blazorise sets margin-left:5px on the flyout container,
   creating a gap between the 64px sidebar and the flyout menu. The mouse leaves the dropdown
   element when crossing this gap, triggering mouseleave and closing the flyout. */
.b-bar-vertical-inline[data-collapse="small"] .b-bar-dropdown .b-bar-dropdown-menu-container {
    margin-left: 0px !important;
    margin-right: 0px !important;
}

.input-file-component-holder {
    text-align: center;
}

.delete-date-holder > div {
    cursor: pointer;
    text-decoration: underline;
    font-weight: bold;
    width: fit-content;
}

/* ============================================
   Global Scrollbar Override
   Applies only to main scrollable containers
   ============================================ */

:root {
    --scroll-size: 14px;
    --scroll-radius: 999px;
    --scroll-track: rgba(0, 0, 0, 0.06);
    --scroll-thumb: #003665; /* primary color */
    --scroll-thumb-hover: #004c91; /* lighter shade for hover */
    --scroll-shadow: inset 0 0 6px rgba(0, 0, 0, 0.15);
}

/* ---- Scrollbar styling for main containers only (Firefox) ---- */
html,
body,
.content,
.modal-body {
    scrollbar-width: auto;
    scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

/* ---- WebKit-based browsers (Chrome, Edge, Safari) ---- */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.content::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
    width: var(--scroll-size);
    height: var(--scroll-size);
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.content::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
    background: var(--scroll-track);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
    background-color: var(--scroll-thumb);
    border-radius: var(--scroll-radius);
    box-shadow: var(--scroll-shadow);
    border: 3px solid transparent;
    background-clip: padding-box;
    transition: background-color 0.15s ease, transform 0.12s ease;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.content::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
    background-color: var(--scroll-thumb-hover);
}

/* ---- Slim scrollbar for text-heavy areas ---- */
textarea::-webkit-scrollbar,
pre::-webkit-scrollbar,
code::-webkit-scrollbar {
    width: 12px;
}

/* ---- Motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
    html::-webkit-scrollbar-thumb,
    body::-webkit-scrollbar-thumb,
    .content::-webkit-scrollbar-thumb {
        transition: none;
    }
}

.badge-count {
    position: absolute !important;
    right: 1px !important;
    top: 1px !important;
    font-size: 0.6rem;
}

.dropdown-notif {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
}

#dropdown-notif-width {
    max-width: 30rem;
    width: max-content;
}

.dropdown-notif-header-footer {
    padding: 0px !important;
    font-size: small;
    text-align: center;
}

.notif-item {
    transition: background-color 0.2s ease;
}

    .notif-item:hover {
        background-color: #f2f6fa;
    }

.notif-unread {
    background-color: rgba(255, 0, 0, 0.08);
    border-left: 3px solid #c0392b;
}

/* Conversation list item hover effect (matches notif-item pattern) */
.conversation-list-item-hover {
    transition: background-color 0.2s ease;
}

    .conversation-list-item-hover:hover {
        background-color: #f2f6fa;
    }

/* ============================================
   Dynamic Full-Height Datagrid Layout
   Uses flexbox to auto-fill remaining viewport
   ============================================ */

/* Page wrapper that fills available height */
.datagrid-page-layout {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 70px); /* Viewport minus header */
    overflow: hidden;
}

/* Datagrid container that fills remaining space */
.datagrid-flex-container {
    flex: 1 1 0;
    min-height: 0; /* Important for flex children to shrink */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Make the DataGrid itself fill the flex container */
.datagrid-flex-container .table-responsive {
    flex: 1 1 0;
    min-height: 0;
    overflow: auto;
}

/* Override the fixed max-height when using flex layout */
.datagrid-flex-container .table-fixed-header {
    max-height: none !important;
    height: 100%;
}

/* Add padding between datagrid table and pager */
.row.justify-content-between {
    margin-top: 0.75rem !important;
}

/* Remove default margin-bottom from pagination */
.pagination {
    margin-bottom: 0 !important;
}

/* Prevent text selection on tabs */
.nav-tabs,
.nav-tabs .nav-link,
.nav-tabs .nav-item {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* @Mention autocomplete dropdown item hover */
.mention-item {
    transition: background-color 0.15s ease;
}

    .mention-item:hover {
        background-color: #f2f6fa;
    }

/* Image lightbox overlay for in-app image preview */
.image-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    cursor: default;
}

.image-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 1.3rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

    .image-lightbox-close:hover {
        background: rgba(255, 255, 255, 0.3);
    }

.image-lightbox-download {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

    .image-lightbox-download:hover {
        background: rgba(255, 255, 255, 0.3);
        color: white;
    }

/* Chat message scroll-to highlight animation */
.message-highlight {
    animation: messageHighlight 2s ease-out;
}

@keyframes messageHighlight {
    0% {
        background-color: rgba(0, 54, 101, 0.15);
    }

    100% {
        background-color: transparent;
    }
}

/* Floating chat window */
.floating-chat-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 420px;
    height: 550px;
    z-index: 1045;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.floating-chat-window.minimized {
    height: auto;
    width: 320px;
}

.floating-chat-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #003665;
    color: white;
    cursor: pointer;
    user-select: none;
    min-height: 42px;
}

.floating-chat-title-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.floating-chat-title {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-chat-subtitle {
    font-size: 0.7rem;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.floating-presence-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #28a745;
    display: inline-block;
    flex-shrink: 0;
}

.floating-chat-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
    margin-left: auto;
}

.floating-chat-unread-badge {
    background: #dc3545;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    line-height: 1.3;
    min-width: 1.2rem;
    text-align: center;
}

    .floating-chat-actions .btn {
        color: white;
        padding: 0.15rem 0.4rem;
        opacity: 0.7;
    }

        .floating-chat-actions .btn:hover {
            opacity: 1;
            background: rgba(255, 255, 255, 0.15);
        }

.floating-chat-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

    /* Override MessageThread height inside floating window */
    .floating-chat-body > .d-flex.flex-column.h-100 {
        height: 100% !important;
    }

    /* Constrain images inside floating chat so they don't overflow */
    .floating-chat-body img {
        max-width: 100% !important;
    }

/* Supply Order modal shared styles */
.so-label {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #495057;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.so-label-icon {
    color: #6c757d;
    font-size: 0.8rem;
}

.so-arrow-icon {
    color: #6c757d;
    opacity: 0.7;
}

.so-table-wrapper {
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.so-table {
    margin-bottom: 0 !important;
}

.so-total-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    background: #f8f9fa;
    border-radius: 0.375rem;
    font-weight: 600;
}

.so-total-amount {
    font-size: 1.1rem;
    color: #212529;
}

/* ============================================
   HotelTRS branded loader
   Replaces Blazorise.LoadingIndicator visuals
   and hides the default Blazor enhanced-nav
   progress bar with a centered logo + spinner.
   ============================================ */

/* Hide the default thin progress bar that Blazor's enhanced navigation
   renders above the header during page transitions. */
.blazor-load-progress,
.blazor-load-progress-circle,
.blazor-load-progress-bar {
    display: none !important;
}

/* Make the Blazorise LoadingIndicator overlay a full-screen dim backdrop
   centered on a circular spinner with the TRS logo in the middle. */
.b-loading-indicator-overlay,
.loading-indicator-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.45) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1080 !important;
}

/* Hide every child the package renders (default spinner, icon glyph, etc.) so
   only our pseudo-element loader shows. Earlier we only targeted the
   "spinner" class, but the package also renders an icon element which showed
   through as a black artefact behind the logo. */
.b-loading-indicator-overlay > *,
.loading-indicator-overlay > * {
    display: none !important;
}

.b-loading-indicator-overlay::before,
.loading-indicator-overlay::before {
    content: "";
    position: absolute;
    width: 135px;
    height: 135px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: trs-loader-spin 1s linear infinite;
}

.b-loading-indicator-overlay::after,
.loading-indicator-overlay::after {
    content: "";
    position: absolute;
    width: 105px;
    height: 105px;
    border-radius: 50%;
    background-color: #003665;
    background-image: url("/content/trs_logo.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70%;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    animation: trs-loader-pulse 1.6s ease-in-out infinite;
}

@keyframes trs-loader-spin {
    to { transform: rotate(360deg); }
}

@keyframes trs-loader-pulse {
    0%, 100% { opacity: 0.85; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
    .b-loading-indicator-overlay::before,
    .loading-indicator-overlay::before,
    .b-loading-indicator-overlay::after,
    .loading-indicator-overlay::after {
        animation: none;
    }
}