
.receiving-table .release-col {
  width: 54px;
  text-align: center;
}

.release-scan-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 4px;
  align-items: center;
}

.release-scan-fields .release-sap-no {
  grid-column: 1;
}

.release-scan-button {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
}

.release-stock-info {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
  color: #314154;
}

.release-stock-info .error {
  color: #b00020;
  font-weight: 700;
}

.release-check {
  width: 18px !important;
  height: 18px;
  accent-color: var(--brand);
}

.release-signature-img:not([hidden]) {
  max-width: 118px;
  max-height: 26px;
  display: block;
  margin: 0 auto;
}

.release-signature-img[hidden] {
  display: none !important;
}

.release-controls {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #aeb7c4;
  background: #f8fcfd;
  font-size: 13px;
}

.release-controls[hidden],
.release-otp-row[hidden] {
  display: none !important;
}

.release-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.release-signature-canvas {
  width: 100%;
  height: 138px;
  border: 1px solid #aeb7c4;
  background: #ffffff;
  touch-action: none;
  display: block;
  margin-top: 8px;
}

.release-status-text {
  color: var(--brand);
  font-weight: 700;
  min-height: 18px;
}

.release-receiver-option {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #aeb7c4;
  background: #ffffff;
  font-size: 13px;
}

.release-receiver-option label {
  font-weight: 700;
}

.release-receiver-option input[type="checkbox"] {
  width: auto;
  margin-right: 6px;
  accent-color: var(--brand);
}

.release-other-person-fields {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.release-other-person-fields[hidden] {
  display: none !important;
}

.release-other-person-fields textarea {
  width: 100%;
  min-height: 68px;
  resize: vertical;
  border: 1px solid #aeb7c4;
  border-radius: 4px;
  padding: 6px;
  font: inherit;
}

#releaseNowButton {
    white-space: nowrap;
}

.release-avail-qty {
  color: #2e7d52;
  font-weight: 700;
}

.release-avail-qty {
  color: #2e7d52;
  font-weight: 700;
}

.release-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 40, 60, 0.35);
}

.release-popup-overlay[hidden] {
  display: none;
}

.release-popup {
  background: #ffffff;
  border-radius: 14px;
  padding: 26px 40px;
  min-width: 280px;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  animation: packing-pop-in 0.25s ease-out;
  text-align: center;
}

.release-popup-icon[hidden] {
  display: none;
}

.release-popup-icon-sending {
  position: relative;
  width: 56px;
  height: 56px;
}

.release-popup-spinner {
  position: absolute;
  inset: 0;
  border: 4px solid #d6e7f5;
  border-top-color: #1d6fb8;
  border-radius: 50%;
  animation: release-popup-spin 0.9s linear infinite;
}

.release-popup-envelope {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #1d6fb8;
  animation: release-popup-bob 1.2s ease-in-out infinite;
}

.release-popup-check {
  width: 56px;
  height: 56px;
}

.release-popup-check-circle {
  stroke: #198754;
  stroke-width: 3;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: packing-draw 0.5s ease-out forwards;
}

.release-popup-check-mark {
  stroke: #198754;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: packing-draw 0.45s ease-out 0.35s forwards;
}

.release-popup-icon-warning {
  font-size: 44px;
  color: #b45309;
  animation: packing-pop-in 0.3s ease-out;
}

.release-popup-title {
  font-weight: 600;
  font-size: 16px;
  color: #1c3d5a;
}

.release-popup-message {
  font-size: 13.5px;
  color: #44586c;
}

.release-popup-actions[hidden],
.release-popup-actions:empty {
  display: none;
}

@keyframes release-popup-spin {
  to { transform: rotate(360deg); }
}

@keyframes release-popup-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ==========================================================================
   Receiving Form / Release (#receiving-print) — mobile (module-scoped, <=640px).
   The editable receiving-table has a 980px min-width (global table rule) which
   previously stretched the whole form and was clipped by the screen's
   overflow-x:clip, hiding the Item Size / scan / Remarks columns. Wrap the table
   in a horizontal-scroll container so the form, signature pad and OTP controls
   fit the viewport while the table scrolls inside its own box. Desktop shows the
   table full-width as before (wrapper is transparent above 640px).
   ========================================================================== */
.receiving-table-wrap {
  max-width: 100%;
}
@media (max-width: 640px) {
  #receiving-print .receiving-page {
    width: 100%;
    min-width: 0;
  }
  #receiving-print .receiving-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #d6dde3;
  }
  #receiving-print .release-signature-canvas {
    max-width: 100%;
  }
}


.release-qty-input.qty-invalid {
  outline: 2px solid #b42318;
  outline-offset: 1px;
}

.release-qty-warning {
  margin-top: 3px;
  min-height: 1em;
  font-size: 11px;
  line-height: 1.1;
  color: #b42318;
  white-space: normal;
}
