/**
 * Internal governance labels — scope-branded layout (print + screen).
 * Product/Carton/Pallet: linear + QR · Rack: high-contrast · QR compact under CODE128 strip.
 * (label-print.css is linked from internal-label-print.html)
 */

.il-workflow {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.il-search-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.il-search-wrap {
  position: relative;
}

.il-search-wrap input[type='search'] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #475569;
  background: #0f172a;
  color: #f1f5f9;
  font-size: 14px;
}

.il-search-dropdown {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 280px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid #475569;
  background: #0f172a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.il-search-dropdown li {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #1e293b;
}

.il-search-dropdown li:last-child {
  border-bottom: none;
}

.il-search-dropdown li:hover,
.il-search-dropdown li:focus {
  background: #1e293b;
  outline: none;
}

.il-search-dropdown__title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
}

.il-search-dropdown__sub {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

.il-product-details {
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 12px 14px;
  background: #0f172a;
}

.il-product-details__title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

.il-detail-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px 16px;
}

.il-detail-grid div {
  margin: 0;
}

.il-detail-grid dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 4px;
}

.il-detail-grid dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #f8fafc;
  word-break: break-word;
}

.il-actions {
  margin-top: 4px;
}

.il-hint {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(14, 165, 233, 0.08);
  color: #bae6fd;
  font-size: 13px;
  line-height: 1.45;
}

@media screen {
  .labels-host--scroll {
    max-height: min(72vh, 720px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
}

.label-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.label-card--carton .il-qr-canvas {
  width: 96px !important;
  height: 96px !important;
}

.label-card--pallet {
  border-width: 4px !important;
  border-color: #0f172a !important;
}

.label-card--pallet .il-qr-canvas {
  width: 112px !important;
  height: 112px !important;
}

.label-card--rack .il-qr-canvas {
  width: 88px !important;
  height: 88px !important;
}

.label-card--rack {
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 2px solid #f8fafc !important;
}

.label-card--rack .il-human-line,
.label-card--rack .label-code,
.label-card--rack .il-scan-line {
  color: #f8fafc !important;
}

.label-card--rack .il-meta-block .barcode-note {
  color: #cbd5e1 !important;
}

.label-card--rack .il-barcode-strip .barcode-note {
  color: #64748b !important;
}

.label-card--rack .il-qr-row {
  background: #020617;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
}

/* Keep linear barcode on white for scanner reliability */
.label-card--rack .il-barcode-strip {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 2px solid #f8fafc !important;
}

.label-card--rack .barcode-text {
  color: #0f172a !important;
}

.label-card--rack .il-scope-footer--card {
  color: #cbd5e1 !important;
}

/* Vertical stack: meta → CODE128 (full width) → compact QR → footer */
.il-meta-block {
  display: block;
}

.il-barcode-strip {
  width: 100%;
  box-sizing: border-box;
}

.il-barcode-strip .wms-linear-svg {
  width: 100%;
  max-width: 100%;
  min-height: 72px;
  display: block;
  margin-top: 6px;
}

.il-qr-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

.il-scope-footer--card {
  margin-top: 4px;
}

.il-human-line {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.il-scan-line {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 4px;
  word-break: break-all;
}

.il-scope-footer {
  margin-top: 10px;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

.il-qr-note {
  font-size: 0.62rem;
  color: #94a3b8;
  margin-top: 0;
  max-width: 220px;
  text-align: center;
}

@media print {
  .labels-host--scroll {
    max-height: none !important;
    overflow: visible !important;
  }
  .label-card--rack {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
