/*TODO use gratis variables here instead of hardcoding here*/
.btn-secondary {
    color: #1c77ac;
    background-color: #fff;
    border: 1px solid #1c77ac;
}

.btn-secondary:hover {
    background-color: #1c77ac;
    color: #fff;
}

a, .btn-link {
    color: #006bb7;
}

.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;
}

/* Autosave feedback for regular inputs */
.autosaving, .autosaving:disabled {
    background-color: #fff3cd !important;
}

.autosaving-success, .autosaving-success:disabled {
    background-color: #d4edda !important;
}

.autosaving-failed, .autosaving-failed:disabled {
    background-color: #f8d7da !important;
}

/* Autosave feedback for wrapper divs containing inputs */
.autosave-wrapper.autosaving input,
.autosave-wrapper.autosaving select,
.autosave-wrapper.autosaving .tvd-multiselect {
    background-color: #fff3cd;
}

.autosave-wrapper.autosaving-success input,
.autosave-wrapper.autosaving-success select,
.autosave-wrapper.autosaving-success .tvd-multiselect {
    background-color: #d4edda;
}

.autosave-wrapper.autosaving-failed input,
.autosave-wrapper.autosaving-failed select,
.autosave-wrapper.autosaving-failed .tvd-multiselect {
    background-color: #f8d7da;
}

/* Autosave feedback for TinyMCE rich text editor */
.autosaving .tox-tinymce,
.autosaving .mce-tinymce {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25) !important;
}

.autosaving-success .tox-tinymce,
.autosaving-success .mce-tinymce {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25) !important;
}

.autosaving-failed .tox-tinymce,
.autosaving-failed .mce-tinymce {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Room Allocation Stats */
.room-allocation-stats {
    display: flex;
    gap: 1rem;
    pointer-events: none;
    color: inherit;
}

.room-allocated,
.room-allocated i {
    color: #28a745 !important;
    font-weight: 600;
}

.room-unallocated,
.room-unallocated i {
    color: #dc3545 !important;
    font-weight: 600;
}

legend.fieldset-legend .room-allocation-stats {
    font-size: 0.9rem;
}

/* FieldSet Component Styles */
legend.fieldset-legend {
    display: flex;
    align-items: center;
    width: 100%;
}

.fieldset-legend-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.fieldset-title {
    margin-left: 0.5rem;
}

.fieldset-right-content {
    margin-left: auto;
}

/* Bootstrap 5.3 uses box-shadow (not background-color) to colour table cells,
   layering state/type/bg variables. table-striped sets --bs-table-bg-type on odd cells,
   causing alternating lighter/white rows inside .table-danger rows.
   Override box-shadow directly on danger cells, bypassing the type variable entirely.
   --bs-table-bg-state is still honoured so hover works correctly. */
.table > tbody > tr.table-danger > * {
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state, rgb(248, 214.6, 217.8));
}
.table-hover > tbody > tr.table-danger:hover > * {
    --bs-table-bg-state: rgb(229.4, 198.505, 201.465);
}

/* Bootstrap 4 tooltips (tooltip.interop.js appends them to this container) have no
   pointer-events rule, so when Popper flips/shifts a popover over a control the popover
   swallows the click. Tooltips here are display-only, so let clicks pass through. */
#bootstrap-tooltip-container .tooltip {
    pointer-events: none;
}

/* Narrower box for tooltips on small icon buttons, especially in a grid's last column. The legacy
   .bootstrap-iso rules widen .tooltip-inner to 400px, and a box that wide cannot be centred under an
   icon near the window edge, so Popper slides it sideways away from its arrow (VENUED-8450). */
#bootstrap-tooltip-container .tooltip.tooltip-compact .tooltip-inner {
    max-width: 220px;
    padding: 6px 10px;
    text-align: center;
}

/* Blazored.Toast sets z-index: 999, below Bootstrap's modal (1055) and backdrop (1050), so toasts
   raised while a modal is open render under the faded backdrop. 1090 is Bootstrap's toast layer
   (above modals, popovers and tooltips). !important is needed because the library rule is scoped
   (.blazored-toast-container[b-…], higher specificity) and loads after this file. */
.blazored-toast-container {
    z-index: 1090 !important;
}

/* V2 toastr alerts are set to top-centre by v2ShellLoader (VENUED-8849). toastr pins that
   container at top: 0; drop it 2rem to line up with the Blazored toasts above. The id selector
   outranks toastr.min.css, which the legacy V2 stylesheet loads after this file. */
#toast-container.toast-top-center {
    top: 2rem;
}

/* Static fallback shown while the WebAssembly runtime, route dependencies, and
   the first interactive route render. The local GIF is reused by the full-page
   loaders after startup and is not dependent on the V2 proxy. */
#gratis-boot-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    background: #fff;
    color: #212529;
}

#gratis-boot-screen[hidden] {
    display: none;
}

.gratis-boot-screen-content {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.gratis-boot-screen-spinner {
    display: block;
    width: 150px;
    height: 50px;
    object-fit: contain;
}

/* VENUED-9732: the target CSP has no style-src-attr 'unsafe-inline', so markup uses these instead of style attributes.
   Prefer Bootstrap's utilities where one exists (text-break, align-text-top, d-flex …); these cover the rest. */
.js-start-hidden.js-start-hidden {
    /* Until cspStyleAttributes.js swaps it for an inline display:none, which .show()/.toggle() can undo. Not
       !important, and doubled to outrank single-class display rules. It does not outrank V2's two-class rules such
       as .bootstrap-iso .input-group-append (gratisv2.min.css loads later), so V2 markup relies on the swap. */
    display: none;
}

/* Replaces an inline display:block. Not !important (unlike Bootstrap's d-block), so jQuery .hide() still works. It
   loses to a two-class rule such as V2's .bootstrap-iso .modal { display: none }: use d-block there. */
.csp-block {
    display: block;
}

.csp-mt-6 {
    margin-top: 6px !important;
}

/* V2 ColourPickerViewRenderer: an SVG whose rect fill (a presentation attribute, not governed by CSP) is the colour. */
.csp-colour-swatch {
    display: block;
    width: 16px;
    height: 16px;
    float: left;
}

.csp-colour-swatch-label {
    float: left;
    padding-left: 10px;
}

/* V2 Home booking-summary headings that toggle their table on click. */
.csp-cursor-pointer {
    cursor: pointer !important;
}

/* V2 ClientsAutoComplete: a parent client's row cells. */
.csp-parent-client {
    color: green !important;
    font-weight: bold !important;
}

/* V2 column widths: autocomplete and search results, Reconciliation and Employees tables (Bootstrap only has
   w-25/50/75/100). Dashes stand for decimal points: csp-w-5-6 is 5.6%. */
.csp-w-1 { width: 1% !important; }
.csp-w-2 { width: 2% !important; }
.csp-w-3 { width: 3% !important; }
.csp-w-5 { width: 5% !important; }
.csp-w-5-6 { width: 5.6% !important; }
.csp-w-6-75 { width: 6.75% !important; }
.csp-w-7 { width: 7% !important; }
.csp-w-7-85 { width: 7.85% !important; }
.csp-w-8 { width: 8% !important; }
.csp-w-9 { width: 9% !important; }
.csp-w-10 { width: 10% !important; }
.csp-w-12 { width: 12% !important; }
.csp-w-13 { width: 13% !important; }
.csp-w-14 { width: 14% !important; }
.csp-w-15 { width: 15% !important; }
.csp-w-17 { width: 17% !important; }
.csp-w-18 { width: 18% !important; }
.csp-w-20 { width: 20% !important; }
.csp-w-22 { width: 22% !important; }
.csp-w-28 { width: 28% !important; }
.csp-w-30 { width: 30% !important; }
.csp-w-35 { width: 35% !important; }
.csp-w-40 { width: 40% !important; }
.csp-w-45 { width: 45% !important; }
.csp-w-65 { width: 65% !important; }
.csp-w-80 { width: 80% !important; }
.csp-w-90 { width: 90% !important; }
.csp-w-5-2em { width: 5.2em !important; }
.csp-w-6-5em { width: 6.5em !important; }
.csp-w-120px { width: 120px !important; }

/* V2 Reconciliation client fields: the read-only value box beside each drop-down (starts hidden with js-start-hidden). */
.csp-clip-120px {
    width: 120px !important;
    max-width: 120px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

/* V2 Reconciliation: the fee summary fieldset, the invoice upload button over its file input, and the Apply button,
   which keeps its tooltip while disabled. */
.csp-min-h-95 { min-height: 95% !important; }
.csp-position-absolute { position: absolute !important; }
.csp-pointer-events-auto { pointer-events: auto !important; }

/* V2 Questions: a declined answer's row, and the Q:/A: labels. */
.csp-declined-answer {
    color: #FF3B3B !important;
    background-color: #FFECEC !important;
}

.csp-question-label {
    color: #575963 !important;
}

/* V2 Search: the search-term length warning (starts hidden with js-start-hidden). */
.csp-search-term-warning {
    color: red !important;
    margin-top: 4px !important;
}

/* V2 Suppliers commission rates. */
.csp-fs-11 { font-size: 11px !important; }
.csp-webkit-inline-box { display: -webkit-inline-box !important; }

/* V2 Questions and the question builder. */
.csp-p-2px { padding: 2px !important; }
.csp-pt-2px { padding-top: 2px !important; }
.csp-ml-n45 { margin-left: -45px !important; }

/* V2 Company Preferences (client field dropdown sort header) and Contacts (a disabled source option). */
.csp-pr-58px { padding-right: 58px !important; }
.csp-text-cfcfcf { color: #cfcfcf !important; }

/* V2 Office Preferences (the client questions pane) and Preferred Venues (the edit list's bottom spacer, and the
   ENQ/ARR/NOT preference type). */
.csp-clear-both { clear: both !important; }
.csp-pb-60px { padding-bottom: 60px !important; }
.csp-text-green { color: green !important; }
.csp-text-orange { color: orange !important; }
.csp-text-red { color: red !important; }

/* V2 Clients (VENUED-9674): the SLA and response time inputs, the Accounts PO modal, the billing notes list and its
   default row and edit cells, the client field edit cells, the preferred-label spacer, and the Move Contacts dropdown. */
.csp-mw-30px { max-width: 30px !important; }
.csp-mw-1050px { max-width: 1050px !important; }
.csp-scroll-300px {
    max-height: 300px !important;
    overflow: auto !important;
}
.csp-w-100px { width: 100px !important; }
.csp-w-300px { width: 300px !important; }
.csp-w-6em { width: 6em !important; }
.csp-h-50px { height: 50px !important; }
.csp-h-93px { height: 93px !important; }
.csp-mr-5px { margin-right: 5px !important; }
.csp-bg-effff0 { background-color: #EFFFF0 !important; }
.csp-text-495057 { color: #495057 !important; }
.csp-text-575963 { color: #575963 !important; }
.csp-contacts-dropdown-menu {
    width: inherit !important;
    min-width: 100% !important;
    /* Not !important: moveContacts.adjustDropdownHeightAndPosition sets max-height inline to fit the filtered list. */
    max-height: 190px;
    overflow-y: auto !important;
    background-color: white !important;
    color: #495057 !important;
    transition: height 0.2s !important;
}

/* V2 Venues: the listing type row, the notes text, the delegate rate boxes and the radius search map. */
.csp-mt-n10px { margin-top: -10px !important; }
.csp-pt-5px { padding-top: 5px !important; }
.csp-h-80px { height: 80px !important; }
.csp-venue-map {
    width: 760px !important;
    height: 400px !important;
    margin-left: 3px !important;
}

/* V2 Venues tube map search: the thumbnail grid's background. */
.csp-tube-thumb {
    height: 80px !important;
    width: 120px !important;
    background-image: url('/gratisv2/im/maps/tube_thumb.gif') !important;
}

/* Not !important: gratisv2.js writes these inline. tubeMap.reDraw animates the map image's margins, and
   venueRooms shows and hides the floor plan zoom lens and result through style.visibility. */
.csp-tube-map-image {
    margin-left: -500px;
    margin-top: -375px;
}

.csp-invisible { visibility: hidden; }
