#blazor-error-ui {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  display: none;
  padding: 0.75rem 1.25rem;
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 10000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  float: right;
}

html[data-bs-theme="light"] [data-theme-dropdown-toggle-icon="light"],
html[data-bs-theme="dark"] [data-theme-dropdown-toggle-icon="dark"] {
  display: inline-block !important;
}

html[data-bs-theme="light"] [data-theme-dropdown-toggle-icon="dark"],
html[data-bs-theme="dark"] [data-theme-dropdown-toggle-icon="light"],
html [data-theme-dropdown-toggle-icon="auto"] {
  display: none !important;
}

.theme-control-dropdown .dropdown-item {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.theme-control-dropdown .dropdown-item .svg-inline--fa,
.theme-control-dropdown .dropdown-item .fa {
  font-size: 0.9rem;
  height: 1em;
  width: 1em;
}

.theme-control-dropdown .dropdown-check-icon {
  visibility: hidden;
}

.theme-control-dropdown .dropdown-item.active .dropdown-check-icon {
  visibility: visible;
}

/* Clean, professional table styling used across the app */
.table {
  border-collapse: separate; /* keep rounded corners */
  border-spacing: 0;
  background: var(--bs-body-bg, #fff);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 0.375rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,24,40,0.03);
}

.table thead th {
  background: rgba(0,0,0,0.03);
  color: var(--bs-body-color, #212529);
  font-weight: 600;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 0.75rem;
  vertical-align: middle;
  text-align: left;
}

.table tbody td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  vertical-align: middle;
}

.table-sm th,
.table-sm td {
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
}

.table tbody tr:hover {
  background: rgba(0,0,0,0.02);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0,0,0,0.01);
}

.table-responsive {
  border-radius: 0.375rem;
  overflow: auto;
}

/* Dark theme adjustments */
html[data-bs-theme="dark"] .table {
  background: #0b1220;
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: none;
}

html[data-bs-theme="dark"] .table thead th {
  background: rgba(255,255,255,0.02);
  color: #e5e7eb;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

html[data-bs-theme="dark"] .table tbody td {
  color: #cbd5e1;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

/* Small helper for table cell actions */
.table .text-end .btn-link {
  padding: 0.15rem 0.35rem;
}

/* Strong overrides to ensure our app table styles take precedence over theme.css */
.table > :not(caption) > * > * {
  padding: 0.65rem 0.75rem !important;
  color: var(--bs-body-color, #212529) !important;
  background-color: transparent !important;
  border-bottom: 1px solid rgba(0,0,0,0.04) !important;
}

.table.table-sm.align-middle thead th,
.table.table-sm thead th {
  padding: 0.65rem !important;
}

.table.table-sm.align-middle tbody td,
.table.table-sm tbody td {
  padding: 0.2rem 0.4rem !important;
}

/* Ensure responsive wrapper does not hide rounded corners from our style */
.table-responsive {
  -webkit-overflow-scrolling: touch;
  border-radius: 0.375rem;
}

/* If you still do not see changes, clear browser cache or do a hard reload (Ctrl+F5) */

/* Compact table utility: reduces padding and font-size for dense tables */
.table-compact,
.table.table-compact,
.table-sm.table-compact {
  font-size: 0.875rem;
}

.table-compact > :not(caption) > * > *,
.table.table-compact > :not(caption) > * > *,
.table-sm.table-compact > :not(caption) > * > * {
  padding: 0.4rem 0.5rem !important;
}

/* Make default small tables a bit more compact for lists like OrderManagement */
.table-sm > :not(caption) > * > * {
  padding: 0.45rem 0.6rem !important;
  font-size: 0.9rem !important;
}

/* Colored header for tables - uses theme variables and falls back nicely in dark mode */
.table-compact thead th,
.table thead th {
  background: var(--falcon-primary-bg-subtle, #d9e7fa) !important;
  color: var(--falcon-primary-text-emphasis, #215cac) !important;
  border-bottom: 1px solid rgba(0,0,0,0.06) !important;
}

html[data-bs-theme="dark"] .table-compact thead th,
html[data-bs-theme="dark"] .table thead th {
  /* use a faint tint of the primary color in dark mode */
  background: rgba(var(--falcon-primary-rgb, 44,123,229), 0.07) !important;
  color: var(--falcon-light-text-emphasis, #e5e7eb) !important;
  border-bottom: 1px solid rgba(255,255,255,0.04) !important;
}

/* Slightly tighten row spacing for compact tables */
.table-compact tbody td,
.table.table-compact tbody td {
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
}

/* Compact body text for tables: slightly smaller and tighter spacing */
.table tbody td,
.table-sm tbody td,
.table-compact tbody td,
.table.table-sm tbody td {
  font-size: 0.9rem !important;
  padding-top: 0.4rem !important;
  padding-bottom: 0.4rem !important;
  line-height: 1.2 !important;
}
