/* Restockize custom styles — minimal; Polaris handles all component styling */

/* Urgency badge colours (override Polaris badge tones if needed) */
.urgency-red { --p-color-badge-icon: var(--p-color-icon-critical); }
.urgency-amber { --p-color-badge-icon: var(--p-color-icon-warning); }
.urgency-green { --p-color-badge-icon: var(--p-color-icon-success); }

/* Radar table: product thumbnail column */
.product-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* Sticky footer for PO creation */
.sticky-footer {
  position: sticky;
  bottom: 0;
  background: var(--p-color-bg-surface, #fff);
  border-top: 1px solid var(--p-color-border, #e1e3e5);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}
.sticky-footer.hidden { display: none; }

/* Progress bar for sync */
.sync-progress {
  width: 100%;
  max-width: 400px;
  margin: 40px auto;
  text-align: center;
}
.sync-progress progress {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  border: none;
  background: var(--p-color-bg-fill-secondary, #f1f1f1);
}
.sync-progress progress::-webkit-progress-bar {
  background: var(--p-color-bg-fill-secondary, #f1f1f1);
  border-radius: 4px;
}
.sync-progress progress::-webkit-progress-value {
  background: #1F7A4D;
  border-radius: 4px;
}
.sync-progress p {
  margin-top: 12px;
  color: var(--p-color-text-secondary, #6d7175);
  font-size: 14px;
}

/* CSV import preview table */
.import-preview {
  overflow-x: auto;
  margin-top: 16px;
  font-size: 13px;
}
.import-preview table {
  border-collapse: collapse;
  width: 100%;
}
.import-preview th,
.import-preview td {
  border: 1px solid var(--p-color-border, #e1e3e5);
  padding: 6px 10px;
  white-space: nowrap;
}
.import-preview th {
  background: var(--p-color-bg-surface-secondary, #f6f6f7);
  font-weight: 600;
}

/* Column mapper selects */
.column-mapper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px 12px;
  align-items: center;
  margin-top: 12px;
}
.column-mapper .arrow { color: var(--p-color-text-secondary, #6d7175); }

/* PO status chips */
.po-status-draft    { --badge-tone: neutral; }
.po-status-ordered  { --badge-tone: info; }
.po-status-received { --badge-tone: success; }
.po-status-cancelled { --badge-tone: critical; }

/* Print styles for PO PDF fallback */
@media print {
  s-app-nav, .sticky-footer, .no-print { display: none !important; }
  .print-po { display: block !important; }
}
.print-po { display: none; }
.print-po table { width: 100%; border-collapse: collapse; font-size: 12px; }
.print-po th, .print-po td { border: 1px solid #ccc; padding: 6px; }
.print-po .po-header { margin-bottom: 16px; }
.print-po .po-total { font-weight: bold; }
