/* Marketplace-specific styles (in addition to theme.css) */

/* Product modal (<dialog>) backdrop */
dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* File input */
input[type="file"] {
  color: #94a3b8;
  font-size: 0.875rem;
}
input[type="file"]::file-selector-button {
  background: rgb(124 58 237);
  color: #ffffff;
  border: 0;
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  margin-right: 0.75rem;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 500;
}
input[type="file"]::file-selector-button:hover {
  background: rgb(139 92 246);
}

/* Product card action buttons (WhatsApp / Telegram / email) */
.btn-wa:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
}
.btn-tg:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
}
.btn-email:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.35);
}

/* Unavailable product card (quantity 0) */
.product-unavailable { opacity: 0.55; }

/* Input with a visual prefix (+ / @) */
.input-prefix { position: relative; }
.input-prefix .prefix {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  pointer-events: none;
  user-select: none;
}
.input-prefix input { padding-left: 1.75rem; }

/* Product detail — magnifying glass on hover */
.zoom-wrap { cursor: zoom-in; }
.zoom-wrap img { object-fit: contain; }

.zoom-lens {
  position: absolute;
  width: 150px;
  height: 150px;
  border: 2px solid rgb(139 92 246);
  border-radius: 50%;
  background-repeat: no-repeat;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  display: none;
  z-index: 5;
}

/* Product detail — thumbnail strip */
.thumb {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: rgb(139 92 246); }

/* Rendered markdown (product description) */
.markdown p { margin: 0 0 0.75rem; }
.markdown ul, .markdown ol { margin: 0 0 0.75rem; padding-left: 1.5rem; }
.markdown ul { list-style: disc; }
.markdown ol { list-style: decimal; }
.markdown li { margin-bottom: 0.25rem; }
.markdown a { color: #a78bfa; text-decoration: underline; }
.markdown code { font-family: "JetBrains Mono", monospace; background: rgba(31, 41, 55, 0.6); padding: 0.125rem 0.375rem; border-radius: 0.25rem; }
[data-theme="light"] .markdown a { color: #7c3aed; }
[data-theme="light"] .markdown code { background: rgba(226, 232, 240, 0.8); }

/* Swipeable images */
.zoom-wrap img, #lightbox-image {
  touch-action: pan-y;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}

/* Draggable image thumbnails in the upload modal */
#imageList .thumb { cursor: grab; }
#imageList .thumb:active { cursor: grabbing; }
