/* Listings (reported prices were removed on 2026-11-09). Loaded after css/profile.css and css/community.css on the listing
   pages, which use the community's three columns (the cx- rules) since the redesign of 2026-11-09; the lx- rules here are the
   listing cards and one listing's page. On /account it is loaded with css/portal.css only, and on an organisation's page
   with css/profile.css. See DESIGN.md. */

/* Everything members write, and long translated words, must wrap rather than widen the page */
.mk-main, .mk-profile-card, .mk-account-reason { overflow-wrap: anywhere; }

/* ---- Search: words, species, State. The box takes its own line unless the header card is wide ---- */
.lx-search { grid-template-columns: minmax(0, 1fr) minmax(0, 190px) minmax(0, 190px) auto; }
@container (max-width: 860px) {
  .lx-search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
}
@container (max-width: 480px) {
  .lx-search { grid-template-columns: minmax(0, 1fr) auto; }
  .lx-search #mkSpecies { grid-column: 1 / -1; }
}

/* ---- Listing cards ---- */
.lx-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); list-style: none; }
.lx-grid > li { display: flex; min-width: 0; }
.lx-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; position: relative; transition: box-shadow var(--transition-fast); width: 100%; }
.lx-card:hover { box-shadow: var(--shadow-md); }
.lx-card-media { aspect-ratio: 4 / 3; background: var(--pv-tint); flex: none; overflow: hidden; }
.lx-card-media img { display: block; height: 100%; object-fit: cover; transition: transform 0.4s var(--pv-ease); width: 100%; }
.lx-card:hover .lx-card-media img { transform: scale(1.04); }
/* No photo: the kind's icon on the forest tint */
.lx-ph { align-items: center; display: flex; font-size: 3rem; height: 100%; justify-content: center; line-height: 1; width: 100%; }
.lx-card-cat {
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  color: var(--gray-800);
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  left: 12px;
  line-height: 1.3;
  max-width: calc(100% - 24px);
  padding: 4px 10px;
  overflow: hidden;
  position: absolute;
  text-overflow: ellipsis;
  top: 12px;
  white-space: nowrap;
}
.lx-card-cat > span[aria-hidden] { margin-right: 5px; }
.lx-card-body { display: flex; flex: 1; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px 16px; }
.lx-price { color: var(--gray-700); font-size: 0.92rem; line-height: 1.4; }
.lx-price strong { color: var(--secondary-dark); font-size: 1.18rem; font-weight: 800; }
.lx-price.is-ask { color: var(--gray-600); font-weight: 600; }
.lx-card-title { -webkit-box-orient: vertical; display: -webkit-box; font-size: 1.04rem; font-weight: 800; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.35; overflow: hidden; }
.lx-card-title a { color: var(--gray-900); }
.lx-card:hover .lx-card-title a { color: var(--secondary); }
.lx-meta { align-items: center; color: var(--gray-600); display: flex; font-size: 0.88rem; gap: 6px; line-height: 1.4; min-width: 0; }
.lx-meta .cx-ico { flex: none; height: 16px; width: 16px; }
/* The organisation, on one line: avatar, name and badge */
.lx-card-org { border-top: 1px solid var(--gray-100); margin-top: auto; padding-top: 10px; }
.lx-card-org .cm-author { gap: 8px; }
.lx-card-org .cm-avatar { font-size: 0.85rem; height: 30px; width: 30px; }
.lx-card-org .cm-author-name { font-size: 0.9rem; }
.lx-card-org .cm-author-meta, .lx-card-org .cm-you { display: none; }
/* The badge shrinks to the round tick; its word is still read out */
.lx-card-org .pv-verified { background: var(--secondary); border: 0; border-radius: 50%; color: var(--white); flex: none; font-size: 0; height: 18px; justify-content: center; padding: 0; width: 18px; }
.lx-card-org .pv-verified svg { height: 11px; width: 11px; }
.lx-card-org .cm-author-line { align-items: center; flex-wrap: nowrap; min-width: 0; }
.lx-card-org .cm-author-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- One listing ---- */
.lx-item { overflow: hidden; padding: 0; }
.lx-item-media { align-items: center; aspect-ratio: 16 / 10; background: var(--pv-tint); display: flex; justify-content: center; max-height: 480px; overflow: hidden; width: 100%; }
.lx-item-media img { display: block; height: 100%; object-fit: contain; width: 100%; }
.lx-item-media .lx-ph { font-size: 5rem; }
.lx-item-body { padding: 22px 26px 24px; }
.lx-item-price { font-size: 1rem; margin-top: 8px; }
.lx-item-price strong { font-size: 1.55rem; }
.lx-item-body > .lx-meta { font-size: 0.95rem; margin-top: 6px; }
.lx-item-heading { border-top: 1px solid var(--gray-100); margin-top: 20px; padding-top: 18px; }
.mk-listing-body { margin-top: 8px; white-space: pre-line; }
.lx-item-foot { align-items: flex-start; border-top: 1px solid var(--gray-100); display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 16px; }
.lx-item-foot .cm-tools { margin: 0; }
.mk-message { margin-top: 14px; }

/* More like this, in the right column */
.lx-related { display: grid; gap: 2px; list-style: none; margin-bottom: 8px; }
.lx-related a { align-items: center; border-radius: var(--radius-md); color: inherit; display: flex; gap: 12px; min-height: 44px; padding: 6px; }
.lx-related a:hover { background: var(--gray-50, #FAFAF7); }
.lx-related a:hover strong { color: var(--secondary); }
.lx-related-media { background: var(--pv-tint); border-radius: var(--radius-md); flex: none; height: 56px; overflow: hidden; width: 56px; }
.lx-related-media img { display: block; height: 100%; object-fit: cover; width: 100%; }
.lx-related-media .lx-ph { font-size: 1.5rem; }
.lx-related-text { min-width: 0; }
.lx-related-text strong { -webkit-box-orient: vertical; color: var(--gray-900); display: -webkit-box; font-size: 0.95rem; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.35; overflow: hidden; }
.lx-related-text small { color: var(--gray-600); display: block; font-size: 0.85rem; line-height: 1.4; margin-top: 2px; }
.lx-related-text small strong { color: var(--secondary-dark); display: inline; font-size: inherit; }

/* ---- A listing's facts ---- */
.mk-facts { display: grid; gap: 12px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.mk-facts > div { background: var(--cream); border-radius: var(--radius-md); min-width: 0; padding: 10px 14px; }
.mk-facts dt { color: var(--gray-600); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; line-height: 1.4; text-transform: uppercase; }
.mk-facts dd { color: var(--gray-900); font-size: 1rem; line-height: 1.5; margin-top: 2px; }

/* ---- The listing form ---- */
.mk-review-state { margin-bottom: 4px; }
.mk-edit-image { border-radius: var(--radius-md); margin-bottom: 4px; max-width: 200px; overflow: hidden; }
.mk-edit-image img { display: block; height: auto; width: 100%; }
.mk-main input[type="file"] { height: auto; max-width: 100%; }
.lx-agree { align-items: flex-start; margin: 4px 0 6px; }
.lx-agree input { margin-top: 1px; }

/* ---- /account ---- */
.mk-account-reason { flex-basis: 100%; font-size: 0.94rem; margin: 0; }
.mk-account-actions { display: flex; flex-basis: 100%; flex-wrap: wrap; gap: 8px; }
.mk-account-actions:empty { display: none; }

/* ---- An organisation's page ---- */
.mk-profile-card { margin-top: 24px; }
.mk-profile-list { list-style: none; margin-bottom: 8px; }
.mk-profile-list a { align-items: center; color: inherit; display: flex; gap: 12px; min-height: 44px; padding: 8px 0; }
.mk-profile-list a:hover strong { color: var(--secondary); }
.mk-profile-list img { border-radius: var(--radius-md); flex: none; height: 56px; object-fit: cover; width: 56px; }
.mk-profile-text { min-width: 0; }
.mk-profile-text strong { color: var(--gray-900); display: block; font-size: 1rem; line-height: 1.35; }
.mk-profile-text small { color: var(--gray-600); display: block; font-size: 0.88rem; line-height: 1.35; }

/* ---- Smaller screens ---- */
@media (max-width: 760px) {
  .lx-item-body { padding: 18px 16px 20px; }
}
@media (max-width: 480px) {
  .mk-facts { grid-template-columns: minmax(0, 1fr); }
  .lx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lx-card-body { padding: 10px 12px 12px; }
  .lx-card-cat { font-size: 0.74rem; left: 8px; padding: 3px 8px; top: 8px; }
  .lx-price strong { font-size: 1.05rem; }
  .lx-card-title { font-size: 0.96rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lx-card, .lx-card-media img { transition: none; }
  .lx-card:hover .lx-card-media img { transform: none; }
}
