body { overscroll-behavior: none; }
body .wrapper .main { overflow-y: visible; }
img { max-width: 100%; }

/* Hide global search bar until it is implemented */
#search-form { display: none !important; }

/* Fix weird spacing in navigation */
.sidebar-header + li.mt-3 { margin-top: 0 !important; }

/* Fix buttons in tables / listings */
.table-action a { display: inline-flex; width: 1.5rem; height: 1.5rem; justify-content: center; align-items: center; margin: 0 2px; text-decoration: none; color: white; background-color: #485056; border-radius: 2px; }
.table-action a:hover { color: white; background-color: #777; }

/* Fix icon placement for card headers */
.card-header .col-auto .stat { position: relative; top: -.5rem; right: -.5rem; }

/* Content-based width control for inputs */
.form-control.width-2ch { width: calc(1.4rem + 3ch); flex-grow: 0; }
.form-control.width-3ch { width: calc(1.4rem + 4ch); flex-grow: 0; }
.form-control.width-4ch { width: calc(1.4rem + 5ch); flex-grow: 0; }
.form-control.width-5ch { width: calc(1.4rem + 6ch); flex-grow: 0; }
.form-control.width-6ch { width: calc(1.4rem + 7ch); flex-grow: 0; }
.form-control.width-7ch { width: calc(1.4rem + 8ch); flex-grow: 0; }
.form-control.width-8ch { width: calc(1.4rem + 9ch); flex-grow: 0; }
.form-control.width-9ch { width: calc(1.4rem + 10ch); flex-grow: 0; }
.form-control.width-10ch { width: calc(1.4rem + 11ch); flex-grow: 0; }
.form-control.width-11ch { width: calc(1.4rem + 12ch); flex-grow: 0; }
.form-control.width-12ch { width: calc(1.4rem + 13ch); flex-grow: 0; }

/* Improve design consistency in dropzones */
[data-widget="dropzone"] .dropzone-list .row { display: flex !important; }
[data-widget="dropzone"] .dropzone-list .row .btn.delete { border-radius: .1rem; font-size: .75rem; padding: .15rem .5rem; }

/* Improve visibility of tabs in tab bars */
.tab .nav-tabs { gap: 1ch; }
.tab .nav-tabs .nav-link:not(.active) { color: var(--bs-gray-700); background-color: var(--bs-gray-200); }

/* Disabled tabs */
[role="tablist"] .list-group-item.disabled { color: var(--bs-gray-500); background-color: var(--bs-gray-100); }

/* Inputs */
/* Inputs: numbers */
input[type="number"] { appearance: textfield; }
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button { appearance: none; }
/* Inputs: placeholder */
.form-control::placeholder { color: var(--bs-gray-400); }

/* Fix card action button colors */
.card-actions a.btn-primary { color: #fff; }

/* Fix dropdown z-index */
.dropdown-menu.show { z-index: 100000; }

/* Sticky bottom bar */
.floating-bottom-bar { position: sticky; bottom: 5rem; z-index: 1050; border-top: 5px solid var(--primary-light); }

.grid-autoflow { display: grid; grid-auto-flow: column; justify-content: stretch; gap: 1rem; }

/* Clients */
.client-logo { width: 100%; height: 5rem; object-fit: contain; object-position: center left; }

/* Dropzones */
[data-widget="dropzone"] { position: relative; }
[data-widget="dropzone"] .btn.cancel { display: none; }
[data-widget="dropzone"] .total-progress { display: none; }
[data-widget="dropzone"] .dropzone-drop-area { height: 100px; background-color: var(--bs-gray-200); border-radius: 2px; cursor: pointer; }
[data-widget="dropzone"] .dropzone-drop-area > * { user-select: none; pointer-events: none; }

/* Routes */
#week-datepicker-wrapper .daterangepicker td.active { color: inherit; background-color: transparent; }
#week-datepicker-wrapper .calendar-table tr:hover td { color: inherit; background-color: var(--bs-gray-100); }

.field-wrapper.notes-confirmed { margin-bottom: 0 !important; }
#order-products table.dataTable.table-striped > tbody > tr.odd > * { box-shadow: unset; }
#order-products table [data-column-name="quantity"],
#order-products table [data-column-name="recurrenceInterval"],
#order-products table [data-column-name="originalQuantity"] { width: 1px; }
#order-products table tr.alert-warning { background-color: var(--bs-alert-bg); }
#order-products table tr.alert-warning td { color: var(--bs-alert-color); }
#order-products .dropdown-toggle { display: none; }

th[data-column-name="status"],
th[data-column-name="notesConfirmed"] {
	width: 1px;
}

@media (prefers-color-scheme: dark) {
	.table-warning { --bs-table-bg: #453e34; color: var(--bs-body-color); }

	/* Fix card action button colors */
	.card-actions a.btn-primary { color: #000; }
}

@media (max-width: 1280px) {
	.floating-bottom-bar.desktop-only { position: static; }
}
