/* Quick Order Pad */

#orderpad .op-intro {
  margin: 0 0 16px;
  max-width: 760px;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

#orderpad .op-table-wrap {
  border: 1px solid #e4eaf4;
  border-radius: 10px;
  overflow-x: auto;
}

#orderpad .op-table {
  width: 100%;
  min-width: 700px;
  margin: 0;
  border-collapse: collapse;
}

#orderpad .op-table th {
  padding: 10px 12px;
  background: #f3f6fb;
  border-bottom: 2px solid #e4eaf4;
  color: #1d2b45;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}

#orderpad .op-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #f0f4fb;
  vertical-align: middle;
}

#orderpad .op-table tbody tr:last-child td { border-bottom: 0; }

#orderpad .op-col-num  { width: 48px;  text-align: center; }
#orderpad .op-col-item { width: 250px; }
#orderpad .op-col-qty  { width: 130px; }
#orderpad .op-col-del  { width: 64px; }

#orderpad .op-num {
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

#orderpad .op-item,
#orderpad .op-qty {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #cfd7e6;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font-size: 15px;
  box-sizing: border-box;
}

#orderpad .op-item { text-transform: uppercase; }
#orderpad .op-qty  { text-align: right; }

#orderpad .op-item:focus,
#orderpad .op-qty:focus {
  outline: none;
  border-color: #2e6df6;
  box-shadow: 0 0 0 3px rgba(46, 109, 246, 0.15);
}

#orderpad .op-row[data-state="ok"] .op-item     { border-color: #16a34a; }
#orderpad .op-row[data-state="failed"] .op-item { border-color: #16a34a; }
#orderpad .op-row[data-state="bad"] .op-item,
#orderpad .op-row[data-state="error"] .op-item {
  border-color: #dc2626;
  background: #fef2f2;
}

#orderpad .op-desc {
  font-size: 14px;
  line-height: 1.35;
  color: #1f2937;
}

#orderpad .op-desc-main { display: block; font-weight: 600; }
#orderpad .op-desc-size { display: block; color: #475569; font-size: 13px; }
#orderpad .op-note      { display: block; color: #475569; font-size: 12px; font-style: italic; }
#orderpad .op-muted     { color: #64748b; font-size: 13px; }
#orderpad .op-ok-mark   { display: none; }
#orderpad .op-err       { display: block; color: #b91c1c; font-size: 13px; font-weight: 600; }
#orderpad .op-warn      { display: block; color: #92400e; font-size: 13px; font-weight: 600; }

#orderpad .op-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

#orderpad .op-cell-del { text-align: center; }

#orderpad .op-delete {
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #dc2626;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

#orderpad .op-delete:hover { background: #fee2e2; }

#orderpad .op-delete:focus-visible,
#orderpad .op-btn:focus-visible,
#orderpad .op-link-btn:focus-visible,
#orderpad .op-status-btn:focus-visible {
  outline: 3px solid #2e6df6;
  outline-offset: 2px;
}

/* buttons under the table */
#orderpad .op-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

#orderpad .op-footer-left,
#orderpad .op-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

#orderpad .op-btn {
  padding: 12px 22px;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

#orderpad .op-btn-primary         { background: #2563eb; color: #fff; }
#orderpad .op-btn-primary:hover   { background: #1d4ed8; }
#orderpad .op-btn-secondary       { background: #e5e7eb; color: #111827; }
#orderpad .op-btn-secondary:hover { background: #d1d5db; }

#orderpad .op-btn:disabled,
#orderpad .op-link-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#orderpad .op-link-btn {
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

#orderpad .op-link-btn:hover { color: #1d4ed8; background: transparent; }

/* message under the buttons */
#orderpad .op-status { margin: 14px 0 0; font-size: 14px; line-height: 1.5; }
#orderpad .op-status:empty { display: none; }

#orderpad .op-status.op-ok,
#orderpad .op-status.op-warn,
#orderpad .op-status.op-info {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid;
}

#orderpad .op-status.op-ok   { background: #f0fdf4; border-color: #86efac; color: #14532d; }
#orderpad .op-status.op-warn { background: #fffbeb; border-color: #fcd34d; color: #78350f; }
#orderpad .op-status.op-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }

#orderpad .op-status-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

#orderpad .op-status-btn:hover { background: transparent; }

/* popup */
.op-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.op-dialog::backdrop { background: rgba(15, 23, 42, 0.5); }

.op-dialog-inner { padding: 22px 24px 20px; }

.op-dialog h3 {
  margin: 0 0 10px;
  color: #b91c1c;
  font-size: 18px;
}

.op-dialog p,
.op-dialog li {
  margin: 0;
  color: #1f2937;
  font-size: 15px;
  line-height: 1.5;
}

.op-dialog ul { margin: 0; padding-left: 20px; }
.op-dialog li + li { margin-top: 6px; }

.op-dialog-actions { margin-top: 18px; text-align: right; }

.op-dialog-ok {
  padding: 10px 26px;
  border: 0;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.op-dialog-ok:hover { background: #1d4ed8; }
.op-dialog-ok:focus-visible { outline: 3px solid #2e6df6; outline-offset: 2px; }
