
/* CORRECTO_WMS_DS01_COMPONENTS
   Opt-in classes for new and migrated WMS features.
*/

.wms-ui-card {
  box-sizing: border-box;
  background: var(--wms-ui-surface);
  color: var(--wms-ui-text);
  border: 1px solid var(--wms-ui-border);
  border-radius: var(--wms-ui-radius);
  padding: 16px;
}

.wms-ui-card-title {
  color: var(--wms-ui-heading);
  font-weight: 700;
}

.wms-ui-muted {
  color: var(--wms-ui-muted);
}

.wms-ui-button {
  box-sizing: border-box;
  min-height: 42px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid var(--wms-ui-border);
  background: var(--wms-ui-surface-2);
  color: var(--wms-ui-text);
  font: inherit;
  cursor: pointer;
}

.wms-ui-button-primary {
  background: var(--wms-ui-primary);
  color: var(--wms-ui-primary-text);
  border-color: var(--wms-ui-primary);
}

.wms-ui-field {
  box-sizing: border-box;
  min-height: 42px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--wms-ui-border);
  border-radius: 10px;
  background: var(--wms-ui-input);
  color: var(--wms-ui-text);
  font: inherit;
}

.wms-ui-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--wms-ui-text);
}

.wms-ui-table th,
.wms-ui-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--wms-ui-border);
}

.wms-ui-table th {
  background: var(--wms-ui-surface-2);
  color: var(--wms-ui-heading);
}

.wms-ui-dialog {
  box-sizing: border-box;
  background: var(--wms-ui-surface);
  color: var(--wms-ui-text);
  border: 1px solid var(--wms-ui-border);
  border-radius: var(--wms-ui-radius);
  box-shadow: var(--wms-ui-shadow);
}

/* CORRECTO_WMS_DS03_PRODUCT_CHECK
   Central component migration: product check only.
   No scanner geometry, stock controls or JS changes.
*/

/* Shared page geometry */
.pc-wrap {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

.pc-wrap > *,
.pc-wrap .premium-product-card,
.pc-wrap .product-main,
.pc-wrap .identity-grid,
.pc-wrap .stock-grid,
.pc-wrap .product-data-grid {
  min-width: 0;
}

.pc-wrap .identity-grid > *,
.pc-wrap .stock-grid > *,
.pc-wrap .product-data-grid > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Page surfaces: central semantic colors */
html[data-theme="light"] .pc-wrap .pc-search-card,
html[data-theme="light"] .pc-wrap .premium-product-card,
html[data-theme="light"] .pc-wrap .pc-result.empty,
html[data-theme="dark"] .pc-wrap .pc-search-card,
html[data-theme="dark"] .pc-wrap .premium-product-card,
html[data-theme="dark"] .pc-wrap .pc-result.empty {
  background: var(--wms-ui-surface) !important;
  color: var(--wms-ui-text) !important;
  border-color: var(--wms-ui-border) !important;
}

/* Product identity and stock cards */
html[data-theme="light"] .pc-wrap .identity-grid > div,
html[data-theme="light"] .pc-wrap .stock-grid > div,
html[data-theme="light"] .pc-wrap .sync-footer > div,
html[data-theme="dark"] .pc-wrap .identity-grid > div,
html[data-theme="dark"] .pc-wrap .stock-grid > div,
html[data-theme="dark"] .pc-wrap .sync-footer > div {
  background: var(--wms-ui-surface-2) !important;
  color: var(--wms-ui-text) !important;
  border-color: var(--wms-ui-border) !important;
}

html[data-theme="light"] .pc-wrap .identity-grid b,
html[data-theme="light"] .pc-wrap .stock-grid b,
html[data-theme="light"] .pc-wrap .sync-footer strong,
html[data-theme="dark"] .pc-wrap .identity-grid b,
html[data-theme="dark"] .pc-wrap .stock-grid b,
html[data-theme="dark"] .pc-wrap .sync-footer strong {
  color: var(--wms-ui-heading) !important;
}

html[data-theme="light"] .pc-wrap .identity-grid span,
html[data-theme="light"] .pc-wrap .stock-grid span,
html[data-theme="light"] .pc-wrap .sync-footer span,
html[data-theme="dark"] .pc-wrap .identity-grid span,
html[data-theme="dark"] .pc-wrap .stock-grid span,
html[data-theme="dark"] .pc-wrap .sync-footer span {
  color: var(--wms-ui-muted) !important;
}

/* Headings and descriptive text */
html[data-theme="light"] .pc-wrap .pc-search-card h1,
html[data-theme="light"] .pc-wrap .product-heading h2,
html[data-theme="light"] .pc-wrap .locations-head h3,
html[data-theme="dark"] .pc-wrap .pc-search-card h1,
html[data-theme="dark"] .pc-wrap .product-heading h2,
html[data-theme="dark"] .pc-wrap .locations-head h3 {
  color: var(--wms-ui-heading) !important;
}

html[data-theme="light"] .pc-wrap .pc-search-card p,
html[data-theme="dark"] .pc-wrap .pc-search-card p {
  color: var(--wms-ui-muted) !important;
}

/* Search: one consistent input surface */
html[data-theme="light"] .pc-wrap .pc-search-row input,
html[data-theme="dark"] .pc-wrap .pc-search-row input {
  background: var(--wms-ui-input) !important;
  color: var(--wms-ui-text) !important;
  border-color: var(--wms-ui-border) !important;
}

.pc-wrap .pc-search-row input:focus-visible {
  outline: 2px solid var(--wms-ui-primary);
  outline-offset: 2px;
}

.pc-wrap .pc-search-row input::placeholder {
  color: var(--wms-ui-muted) !important;
  opacity: 1;
}

/* Location container and informational rows */
html[data-theme="light"] .pc-wrap .locations-section,
html[data-theme="dark"] .pc-wrap .locations-section {
  background: var(--wms-ui-surface) !important;
  color: var(--wms-ui-text) !important;
  border-color: var(--wms-ui-border) !important;
}

html[data-theme="light"] .pc-wrap .location-row,
html[data-theme="dark"] .pc-wrap .location-row {
  background: var(--wms-ui-surface-2) !important;
  color: var(--wms-ui-text) !important;
  border-color: var(--wms-ui-border) !important;
}

/* Preserve location action colors and scanner UI. */
.pc-wrap .pc-search-card,
.pc-wrap .premium-product-card,
.pc-wrap .identity-grid > div,
.pc-wrap .stock-grid > div,
.pc-wrap .locations-section {
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

/* Avoid column overflow at intermediate widths */
@media (max-width: 1100px) {
  .pc-wrap .premium-product-card {
    grid-template-columns:
      minmax(160px, 220px) minmax(0, 1fr);
  }
}

@media (max-width: 780px) {
  .pc-wrap .premium-product-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .pc-wrap .pc-search-row {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .pc-wrap .pc-search-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .pc-wrap .pc-search-row input {
    grid-column: auto;
    min-width: 0;
  }

  .pc-wrap .identity-grid,
  .pc-wrap .stock-grid,
  .pc-wrap .product-data-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pc-wrap .identity-grid > div,
  .pc-wrap .product-data-grid > div {
    grid-column: auto;
  }
}

/* CORRECTO_WMS_DS03A_LIGHT_LOCATION_CONTRAST
   Product-check only. Light mode only.
*/

html[data-theme="light"] .pc-wrap
.location-row .location-code strong {
  color: var(--wms-ui-heading) !important;
  -webkit-text-fill-color: var(--wms-ui-heading) !important;
}

html[data-theme="light"] .pc-wrap
.location-row .location-code span {
  color: var(--wms-ui-muted) !important;
  -webkit-text-fill-color: var(--wms-ui-muted) !important;
}

html[data-theme="light"] .pc-wrap .sync-badge {
  color: #116b47 !important;
  -webkit-text-fill-color: #116b47 !important;
  background: #e6f7ed !important;
  border-color: #b2dfc3 !important;
}
