/* MercadilloGeek 3.18 · conversaciones de búsquedas y control horizontal de venta externa */
.mg-wanted-thread {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #d8dfec;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(24, 31, 57, .07);
}

.mg-wanted-thread + .mg-wanted-thread { margin-top: 18px; }
.mg-wanted-thread-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mg-wanted-thread-label span { color: #4d3aad; font-size: 12px; font-weight: 950; letter-spacing: .06em; }
.mg-wanted-thread-label b { padding: 6px 9px; border-radius: 999px; background: #eef1f7; color: #556075; font-size: 11px; }
.mg-wanted-message { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 14px; padding: 18px; border-radius: 16px; background: #f7f9fc; }
.mg-wanted-message > div > header { display: flex; align-items: center; gap: 9px; }
.mg-wanted-message > div > header a { color: #18213a; font-size: 16px; font-weight: 900; text-decoration: none; }
.mg-wanted-message > div > header span { padding: 4px 7px; border-radius: 999px; background: #d9ff71; color: #263216; font-size: 10px; font-weight: 900; }
.mg-wanted-message > div > header time { margin-left: auto; color: #737d8f; font-size: 12px; }
.mg-wanted-message p { margin: 9px 0 0; color: #394359; font-size: 15px; line-height: 1.62; }
.mg-wanted-message.is-follow-up { grid-template-columns: 40px minmax(0, 1fr); margin-left: 48px; padding: 14px 16px; border: 1px solid #e0e5ee; background: #fff; }
.mg-wanted-message.is-follow-up.is-wanted-owner { border-color: #cbe993; background: #f7ffe9; }
.mg-wanted-thread-followups { display: grid; gap: 9px; }
.mg-wanted-thread-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; margin: 2px 0 0 48px; padding: 14px; border-radius: 15px; background: #11162b; }
.mg-wanted-thread-form label { display: grid; gap: 6px; color: #fff; font-size: 13px; font-weight: 900; }
.mg-wanted-thread-form textarea { width: 100%; min-height: 76px; box-sizing: border-box; padding: 11px 12px; border: 1px solid #cad2df; border-radius: 11px; background: #fff; color: #172035; font: inherit; resize: vertical; }
.mg-wanted-thread-form textarea:focus { outline: 3px solid rgba(184, 243, 74, .3); border-color: #b8f34a; }
.mg-wanted-thread-form button { min-height: 46px; padding: 0 17px; border: 0; border-radius: 11px; background: #b8f34a; color: #11162b; font-weight: 950; cursor: pointer; }
.mg-wanted-thread-form small { grid-column: 1 / -1; color: #c6cede; font-size: 11px; }

/* El control deja de ocupar una columna vertical dentro de cada anuncio. */
.mg-manage-list-with-stats > article > .mg-sold-external {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.mg-sold-external summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  box-sizing: border-box;
  padding: 8px 12px;
  list-style: none;
}

.mg-sold-external summary::-webkit-details-marker { display: none; }
.mg-sold-external-icon { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: #ffca4f; color: #332300; font-size: 20px; box-shadow: inset 0 0 0 1px rgba(97, 62, 0, .13); }
.mg-sold-external summary > span:nth-child(2) { display: flex; flex: 1; min-width: 0; align-items: baseline; gap: 10px; }
.mg-sold-external summary b { color: #5d4100; font-size: 15px; }
.mg-sold-external summary small { color: #756a55; font-size: 12px; font-weight: 700; }
.mg-sold-external summary > i { color: #785600; font-size: 18px; font-style: normal; transition: transform .2s ease; }
.mg-sold-external[open] summary > i { transform: rotate(90deg); }
.mg-sold-external form { grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; padding-top: 2px; }
.mg-sold-external form p { font-size: 13px; }
.mg-sold-external form label { white-space: nowrap; }
.mg-sold-external form button { padding-inline: 18px; white-space: nowrap; }

@media (max-width: 700px) {
  .mg-wanted-thread { padding: 13px; border-radius: 17px; }
  .mg-wanted-thread-label { align-items: flex-start; flex-direction: column; }
  .mg-wanted-message { grid-template-columns: 40px minmax(0, 1fr); padding: 13px; }
  .mg-wanted-message.is-follow-up { margin-left: 18px; }
  .mg-wanted-message > div > header { align-items: flex-start; flex-wrap: wrap; }
  .mg-wanted-message > div > header time { width: 100%; margin: 0; }
  .mg-wanted-thread-form { grid-template-columns: 1fr; margin-left: 18px; }
  .mg-wanted-thread-form button { width: 100%; }
  .mg-sold-external summary > span:nth-child(2) { display: grid; gap: 1px; }
  .mg-sold-external summary small { font-size: 11px; }
  .mg-sold-external form { grid-template-columns: 1fr auto; }
  .mg-sold-external form p { grid-column: 1 / -1; }
  .mg-sold-external form label { white-space: normal; }
}

@media (max-width: 430px) {
  .mg-wanted-message.is-follow-up, .mg-wanted-thread-form { margin-left: 0; }
  .mg-sold-external form { grid-template-columns: 1fr; }
  .mg-sold-external form button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .mg-sold-external summary > i { transition: none; }
}
