.pos-product-btn {
  background: #7c3aed;
  border-color: #7c3aed;
}

.pos-product-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, .45);
}

.pos-product-modal-backdrop.is-open {
  display: flex;
}

.pos-product-modal {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 18px 60px rgba(15, 23, 42, .24);
}

.pos-product-head,
.pos-product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.pos-product-actions {
  border-top: 1px solid #e5e7eb;
  border-bottom: 0;
  justify-content: flex-end;
}

.pos-product-head h2 {
  margin: 0;
  font-size: 18px;
}

.pos-product-close {
  width: 34px;
  height: 34px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.pos-product-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.pos-product-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
}

.pos-product-modal label {
  display: grid;
  gap: 6px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

.pos-product-modal input,
.pos-product-modal textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  color: #111827;
  font: inherit;
}

.pos-product-modal textarea {
  resize: vertical;
}

.pos-product-status {
  min-height: 38px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 9px 10px;
  background: #f9fafb;
  color: #4b5563;
  font-size: 13px;
  font-weight: 700;
}

.pos-product-status[data-type="success"] {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.pos-product-status[data-type="warn"] {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #b45309;
}

.pos-product-status[data-type="error"] {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.pos-product-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
  color: #075985;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 700;
}

.pos-product-source[hidden] {
  display: none;
}

.pos-product-source-open {
  min-height: 30px;
  border: 1px solid #0284c7;
  border-radius: 8px;
  background: #0284c7;
  color: #fff;
  padding: 5px 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.pos-product-fixed {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pos-product-fixed span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.pos-product-preview {
  display: grid;
  gap: 5px;
  min-height: 52px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fbfaf7;
  padding: 10px;
  color: #374151;
  font-size: 13px;
}

.pos-product-preview strong {
  color: #111827;
  font-size: 15px;
}

.pos-product-preview small {
  color: #6b7280;
}

.pos-product-preview pre {
  max-height: 240px;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #111827;
  font-size: 12px;
}

.pos-product-primary,
.pos-product-secondary {
  min-height: 38px;
  border: 1px solid #7c3aed;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.pos-product-primary {
  background: #7c3aed;
  color: #fff;
}

.pos-product-secondary {
  background: #fff;
  color: #7c3aed;
}

@media (max-width: 680px) {
  .pos-product-modal-backdrop {
    align-items: stretch;
    padding: 10px;
  }

  .pos-product-grid {
    grid-template-columns: 1fr;
  }

  .pos-product-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pos-product-primary,
  .pos-product-secondary {
    width: 100%;
  }
}
