﻿.projectHeadText .alert p:last-child {
  margin-bottom: 0;
}

.smallerUpper {
  font-size: 12px;
  text-transform: uppercase;
}

.blazored-modal:has(.create-item-modal) {
  max-height: 88vh;
  overflow-y: auto;
  padding-top: 0.75rem;
}

/* WMS-only palette. Customer theme variables must not be referenced here. */
.wms-workspace {
  --wms-accent: #1b6ec2;
  --wms-accent-hover: #155a9b;
  --wms-accent-soft: #eaf3fd;
  --wms-focus: #1b6ec2;
  --wms-text: #212529;
  --wms-muted: #6c757d;
  --wms-border: #dee2e6;
  --wms-surface: #ffffff;
  --wms-surface-subtle: #f8f9fa;
  --wms-hover: #f1f4f7;
  --wms-danger: #b42332;
  --wms-font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  min-width: 0;
  color: var(--wms-text);
  font-family: var(--wms-font-family);
}

/* The external customer stylesheets set global fonts (including * selectors).
   Target text-bearing elements, but never Font Awesome icons. */
.wms-workspace :is(h1, h2, h3, h4, h5, h6, p, a, button, input, select, textarea, label, small, strong, td, th, li) {
  font-family: var(--wms-font-family);
}

.wms-workspace span:not([class*=fa-]) {
  font-family: var(--wms-font-family);
}

.wms-workspace strong {
  font-weight: 600;
}

.wms-workspace .form-label {
  color: var(--wms-text);
  font-weight: 500;
}

.wms-workspace :is(.form-control, .form-select) {
  min-height: 48px;
  border: 1px solid #b9c2cb;
  border-radius: 6px;
  background-color: var(--wms-surface);
  color: var(--wms-text);
  font-size: 16px;
}

.wms-workspace :is(.form-control, .form-select):focus {
  border-color: var(--wms-focus);
  box-shadow: 0 0 0 3px rgba(27, 110, 194, 0.16);
}

.wms-workspace .form-check-input:checked {
  background-color: var(--wms-accent);
  border-color: var(--wms-accent);
}

.wms-workspace :is(button, a, input, select, textarea):focus-visible {
  outline: 2px solid var(--wms-focus);
  outline-offset: 2px;
}

.wms-workspace :is(.btn, .form-check-input, .form-control, .form-select) {
  touch-action: manipulation;
}

/* Existing Bootstrap buttons receive the same fixed WMS accent.
   The reusable WmsButton uses wms-btn variants below. */
.wms-workspace .btn-primary {
  color: #fff;
  background-color: var(--wms-accent);
  border-color: var(--wms-accent);
}

.wms-workspace .btn-primary:hover:not(:disabled) {
  color: #fff;
  background-color: var(--wms-accent-hover);
  border-color: var(--wms-accent-hover);
}

.wms-workspace .btn-outline-primary {
  color: var(--wms-accent);
  border-color: var(--wms-accent);
  background-color: var(--wms-surface);
}

.wms-workspace .btn-outline-primary:hover:not(:disabled) {
  color: #fff;
  background-color: var(--wms-accent-hover);
  border-color: var(--wms-accent-hover);
}

.wms-workspace .btn,
.wms-workspace .wms-btn {
  min-height: 48px;
  font-weight: 600;
}

.wms-workspace .wms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.wms-workspace .wms-btn--primary {
  color: #fff;
  background-color: var(--wms-accent);
  border-color: var(--wms-accent);
}

.wms-workspace .wms-btn--primary:hover:not(:disabled) {
  color: #fff;
  background-color: var(--wms-accent-hover);
  border-color: var(--wms-accent-hover);
}

.wms-workspace .wms-btn--secondary {
  color: var(--wms-text);
  background-color: #fff;
  border-color: #aeb8c2;
}

.wms-workspace .wms-btn--secondary:hover:not(:disabled) {
  background-color: var(--wms-hover);
  border-color: #87929d;
}

.wms-workspace .wms-btn--danger {
  color: var(--wms-danger);
  background-color: #fff;
  border-color: var(--wms-danger);
}

.wms-workspace .wms-btn--danger:hover:not(:disabled) {
  color: #fff;
  background-color: var(--wms-danger);
}

.wms-workspace .wms-btn--ghost {
  color: var(--wms-text);
  background-color: transparent;
  border-color: transparent;
}

.wms-workspace .wms-btn--ghost:hover:not(:disabled) {
  background-color: var(--wms-hover);
}

.wms-workspace .wms-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* WmsFormField applies consistent labels to native Bootstrap inputs/selects. */
.wms-workspace .wms-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 6px;
}

.wms-workspace .wms-field__label {
  margin: 0;
  font-weight: 600;
}

.wms-workspace .wms-field__hint,
.wms-workspace .wms-field__error {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}

.wms-workspace .wms-field__hint {
  color: var(--wms-muted);
}

.wms-workspace .wms-field__error {
  color: var(--wms-danger);
}

/* Shared WMS table, not the customer-themed global table selector. */
.wms-workspace .wms-table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.wms-workspace table.wms-table {
  width: 100%;
  border: 0;
  border-collapse: collapse;
  background-color: #fff;
}

.wms-workspace table.wms-table thead tr th {
  padding: 11px 12px;
  color: #495057;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
  background-color: var(--wms-surface-subtle);
  border: 0;
  border-bottom: 1px solid var(--wms-border);
}

.wms-workspace table.wms-table tbody tr {
  background-color: #fff;
}

.wms-workspace table.wms-table tbody tr:nth-child(odd) {
  background-color: #fff;
}

.wms-workspace table.wms-table tbody tr:hover {
  background-color: var(--wms-hover);
}

.wms-workspace table.wms-table tbody tr.is-selected {
  background-color: var(--wms-accent-soft);
}

.wms-workspace table.wms-table tbody tr td {
  padding: 12px;
  vertical-align: middle;
  border: 0;
  border-bottom: 1px solid #e9ecef;
}

.wms-workspace table.wms-table tbody tr:last-child td {
  border-bottom: 0;
}

.wms-workspace table.wms-table--compact thead tr th,
.wms-workspace table.wms-table--compact tbody tr td {
  padding: 8px 10px;
}

/* Shared selectable list rows, with a visible disabled reason. */
.wms-workspace .wms-choice-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.wms-workspace .wms-choice-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 60px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--wms-border);
  border-radius: 6px;
  color: var(--wms-text);
  background-color: var(--wms-surface);
  cursor: pointer;
  touch-action: manipulation;
}

.wms-workspace .wms-choice-row:hover:not(.is-disabled) {
  background-color: var(--wms-hover);
}

.wms-workspace .wms-choice-row.is-selected {
  background-color: var(--wms-accent-soft);
  border-color: var(--wms-accent);
}

.wms-workspace .wms-choice-row.is-disabled {
  background-color: var(--wms-surface-subtle);
  cursor: not-allowed;
}

.wms-workspace .wms-choice-row__checkbox {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin: 0;
}

.wms-workspace .wms-choice-row__content {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.wms-workspace .wms-choice-row__content strong,
.wms-workspace .wms-choice-row__content small {
  display: block;
}

.wms-workspace .wms-choice-row__hint {
  color: var(--wms-muted);
  font-size: 13px;
}

.wms-workspace .wms-choice-row__trailing {
  flex: 0 0 auto;
  color: var(--wms-muted);
  text-align: right;
}

/* One action bar for creation, picking and placement views. */
.wms-workspace .wms-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background-color: var(--wms-surface);
  border: 1px solid var(--wms-border);
  border-radius: 8px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

.wms-workspace .wms-action-bar--sticky {
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.wms-workspace .wms-action-bar__summary {
  min-width: 0;
}

.wms-workspace .wms-action-bar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 1023.98px) {
  .wms-workspace table.wms-table thead tr th,
  .wms-workspace table.wms-table tbody tr td {
    padding: 10px;
  }
  .wms-workspace .wms-action-bar {
    flex-wrap: wrap;
  }
  .wms-workspace .wms-action-bar__actions {
    margin-left: auto;
  }
}
@media (hover: none) and (pointer: coarse) {
  .wms-workspace .wms-btn,
  .wms-workspace .btn,
  .wms-workspace :is(.form-control, .form-select) {
    min-height: 52px;
  }
}
