/* Spossity Market (web): the shop room inside a Spot, and the owner's product form. */
.market-dialog { width: min(1100px, 96vw); max-width: 96vw; }
.market-dialog .market-body { display: grid; gap: 12px; }
.market-frame { width: 100%; aspect-ratio: 16 / 10; min-height: 420px; border: 0; border-radius: 18px; background: #120e18; }
.market-status, .market-hint { margin: 0; color: #52698f; font-size: 13px; }
html[data-theme="dark"] .market-status, html[data-theme="dark"] .market-hint { color: #9fb4d2; }
/* The owner's product form: a compact card with Spossity's rounded ends, glass and violet actions. */
html body.is-logged-in dialog.spot-form-dialog.market-product-dialog {
  width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px); box-sizing: border-box;
  padding: 0; border: 1px solid var(--line, #d7def0); border-radius: 28px; overflow: hidden;
}
html body.is-logged-in dialog.market-product-dialog[open] { display: flex; flex-direction: column; }
html body.is-logged-in dialog.market-product-dialog > .host-event-header {
  position: relative; top: auto; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 16px 8px 22px; background: transparent;
}
html body.is-logged-in dialog.market-product-dialog > .host-event-header h4 { margin: 0; font-size: 19px; }
html body.is-logged-in dialog.market-product-dialog .host-event-close {
  width: 40px; height: 40px; min-width: 40px; min-height: 40px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(120, 54, 239, .18); background: rgba(255, 255, 255, .6); color: inherit; font-size: 20px; line-height: 1;
}
.market-product-form { display: grid; gap: 12px; padding: 4px 22px 20px; overflow: auto; overscroll-behavior: contain; min-height: 0; }
.market-product-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
html body.is-logged-in .market-product-form :is(input[type="text"], input[type="number"], textarea, select) {
  box-sizing: border-box; width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid #d7def0; border-radius: 16px;
  background-color: rgba(255, 255, 255, .85); color: #0b285b; font: inherit; font-size: 14px; font-weight: 500;
}
html body.is-logged-in .market-product-form textarea { min-height: 76px; resize: vertical; }
html body.is-logged-in .market-product-form select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237836ef' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
html body.is-logged-in .market-product-form :is(input, textarea):focus-visible { outline: 2px solid #8b3dff; outline-offset: 1px; border-color: transparent; }
html[data-theme="dark"] body.is-logged-in .market-product-form :is(input, textarea, select) { border-color: #38577e; background-color: #17243c; color: #f5f8ff; }
.market-product-row { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; }
.market-photo {
  display: grid; place-items: center; height: 168px; border: 2px dashed rgba(120, 54, 239, .45); border-radius: 22px;
  background: linear-gradient(160deg, #f4efff, #e4dafd) center / cover no-repeat; cursor: pointer; text-align: center;
  transition: border-color .2s var(--sp-ease-out), transform var(--sp-dur-snappy) var(--sp-ease-snappy);
}
.market-photo:hover { border-color: #8b3dff; }
.market-photo:active { transform: scale(.99); }
.market-photo span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #7836ef; font-size: 13px; font-weight: 800; box-shadow: 0 4px 14px rgba(120, 54, 239, .16); }
.market-photo span::before { content: "+"; font-size: 16px; line-height: 1; }
.market-photo.has-photo span::before { content: none; }
.market-photo.has-photo { border-style: solid; border-color: rgba(120, 54, 239, .3); }
html[data-theme="dark"] .market-photo { background-color: #1b2240; background-image: linear-gradient(160deg, #241c3d, #1a1530); border-color: rgba(180, 140, 255, .45); }
.market-product-note { min-height: 1em; margin: 0; color: #52698f; font-size: 12px; }
html[data-theme="dark"] .market-product-note { color: #9fb4d2; }
html body.is-logged-in .market-product-form .spot-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 2px 0 0; }
html body.is-logged-in .market-product-form .spot-form-actions button {
  min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1px solid rgba(120, 54, 239, .3);
  background: rgba(255, 255, 255, .7); color: #4b2a9a; font: 700 14px Inter, Arial, sans-serif; cursor: pointer;
}
html body.is-logged-in .market-product-form .spot-form-actions button[type="submit"] {
  border: 0; color: #fff; background: linear-gradient(140deg, #9a6bff 0%, #7b4dff 45%, #5b6cff 100%); box-shadow: 0 8px 20px rgba(123, 77, 255, .35);
}
html body.is-logged-in .market-product-form .spot-form-actions button[type="submit"]:disabled { opacity: .55; cursor: default; }
html body.is-logged-in .market-product-form .spot-form-actions .market-remove { color: #b3261e; border-color: rgba(179, 38, 30, .3); margin-right: auto; }
html[data-theme="dark"] body.is-logged-in .market-product-form .spot-form-actions button:not([type="submit"]) { background: rgba(255, 255, 255, .06); color: #f5f8ff; border-color: rgba(180, 140, 255, .3); }
html[data-theme="dark"] body.is-logged-in dialog.market-product-dialog .host-event-close { background: rgba(255, 255, 255, .08); border-color: rgba(180, 140, 255, .25); }
@media (max-width: 700px) { .market-frame { min-height: 320px; aspect-ratio: 3 / 4; } }
