/* css/balapop-listing.css — editor de anuncios, "Mis anuncios" y polaroids de Balapop
   (js/ui/balapop/*). Usa los tokens de .bp-app (css/wallapop.css). */

/* ── Polaroids ─────────────────────────────────────────────────── */
.bp-ph {
  position: relative; width: 100%; cursor: pointer; user-select: none;
  background: #fff; border: 1px solid var(--bd); border-radius: 10px; padding: 6px 6px 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: transform .12s, box-shadow .12s, border-color .12s;
}
.bp-ph:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.bp-ph.is-on { border-color: var(--g); box-shadow: 0 0 0 2px var(--g) inset; }
.bp-ph-img {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #f4f1ea, #e3ddd0);
}
.bp-ph-obj { font-size: 44px; line-height: 1; filter: drop-shadow(0 3px 3px rgba(0,0,0,.18)); }
.bp-ph-ovl { position: absolute; right: 7%; bottom: 8%; font-size: 22px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.2)); }
.bp-ph-cap { font-size: 11px; color: var(--tx2); text-align: center; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-ph-order {
  position: absolute; top: 2px; left: 2px; z-index: 2;
  background: var(--g); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 9px;
}
.bp-ph.is-compact { padding: 0; border: 0; box-shadow: none; cursor: default; }
.bp-ph.is-compact:hover { transform: none; }

/* encuadres según el tipo de foto */
.bp-ph--general  .bp-ph-img { background: linear-gradient(160deg, #e9efe9, #cfd8cf); }
.bp-ph--general  .bp-ph-obj { font-size: 34px; transform: rotate(-8deg); }
.bp-ph--trasera  .bp-ph-obj { transform: scaleX(-1); filter: brightness(.8) drop-shadow(0 3px 3px rgba(0,0,0,.18)); }
.bp-ph--lateral  .bp-ph-obj { transform: perspective(120px) rotateY(55deg); }
.bp-ph--caja     .bp-ph-img { background: linear-gradient(160deg, #f0e3c8, #dcc49b); }
.bp-ph--manual   .bp-ph-img { background: linear-gradient(160deg, #e6ecf5, #c9d4e6); }
.bp-ph--soporte  .bp-ph-obj { font-size: 30px; opacity: .55; }
.bp-ph--soporte  .bp-ph-ovl { right: auto; bottom: auto; font-size: 38px; }
.bp-ph--funcionando .bp-ph-img { background: radial-gradient(circle at 50% 45%, #fdfbe9, #d9eedd); }
.bp-ph--detalle  .bp-ph-img { background: radial-gradient(circle, #fbf7ef 40%, #ddd3c2); }
.bp-ph--detalle  .bp-ph-obj { font-size: 92px; opacity: .35; }

/* marcas de defectos que se ven en esa foto */
.bp-ph-mark { position: absolute; z-index: 1; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 3px; pointer-events: none; }
.bp-ph-mark i { width: 18px; height: 18px; border: 2px dashed rgba(200, 40, 30, .65); border-radius: 50%; }
.bp-ph-mark.is-clear i { border-style: solid; border-color: #c62828; background: rgba(198, 40, 40, .1); }
.bp-ph-mark.is-glimpse i { border-color: rgba(200, 40, 30, .35); border-width: 1.5px; }
.bp-ph-mark b { font: 700 9.5px/1 system-ui, sans-serif; color: #fff; background: rgba(198, 40, 40, .85); padding: 2px 4px; border-radius: 4px; white-space: nowrap; }

/* ── Editor ────────────────────────────────────────────────────── */
.bpl { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.bpl-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bpl-card { background: #fff; border: 1px solid var(--bd); border-radius: 14px; padding: 14px 16px; }
.bpl-card h3 { margin: 0 0 8px; font-size: 14px; font-weight: 800; display: flex; align-items: baseline; gap: 8px; }
.bpl-card h3 small { font-weight: 600; color: var(--tx2); font-size: 11.5px; }
.bpl-card.is-disabled { opacity: .55; }
.bpl-help { margin: -2px 0 8px; font-size: 12px; color: var(--tx2); }
.bpl-input {
  width: 100%; box-sizing: border-box; border: 1px solid var(--bd); border-radius: 10px;
  padding: 8px 11px; font: inherit; color: var(--tx); background: #fff; outline: none;
}
.bpl-input:focus { border-color: var(--g); box-shadow: 0 0 0 3px var(--gl); }
.bpl-textarea { min-height: 70px; resize: vertical; margin-top: 8px; }

.bpl-truth { background: #fffdf5; border-color: #f1e3b5; }
.bpl-truth p { margin: -2px 0 10px; font-size: 12px; color: #8a6d1d; }
.bpl-truth-row { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 4px 0; font-size: 12.5px; }
.bpl-truth-row > span { color: var(--tx2); }
.bpl-defect::before { content: "• "; color: #c0392b; }
.bpl-defect.is-ok::before { content: "✔ "; color: #1a7f37; }
.bpl-comps { display: flex; flex-wrap: wrap; gap: 6px; }
.bpl-comp { font-size: 11.5px; padding: 1px 8px; border-radius: 9px; background: #e2f7e6; color: #1a7f37; }
.bpl-comp.is-missing { background: #f3f3f6; color: var(--tx2); }

.bpl-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.bpl-ph-wrap { position: relative; }
.bpl-cover {
  position: absolute; top: 2px; right: 2px; z-index: 3; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.55); color: #ffd54a; font-size: 12px; cursor: pointer; line-height: 22px; padding: 0;
}
.bpl-cover:hover { background: rgba(0,0,0,.75); }

.bpl-conds { display: flex; flex-direction: column; gap: 6px; }
.bpl-cond { display: flex; align-items: flex-start; gap: 9px; padding: 7px 10px; border: 1px solid var(--bd); border-radius: 10px; cursor: pointer; }
.bpl-cond:has(input:checked) { border-color: var(--g); background: var(--gl); }
.bpl-cond input { margin-top: 3px; accent-color: var(--g); }
.bpl-cond b { display: block; font-size: 12.5px; }
.bpl-cond small { color: var(--tx2); font-size: 11.5px; }
.bpl-checks { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.bpl-checks label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.bpl-checks input { accent-color: var(--g); }

.bpl-price { display: flex; align-items: center; gap: 8px; }
.bpl-price .bpl-input { width: 110px; font-size: 18px; font-weight: 800; }
.bpl-price > span { font-size: 18px; font-weight: 800; }
.bpl-price .bp-btn { margin-left: auto; }
.bpl-price-info { margin-top: 8px; font-size: 12.5px; line-height: 1.6; }
.bpl-muted { color: var(--tx2); }
.bpl-pos { color: #1a7f37; }
.bpl-neg { color: #c0392b; }

.bpl-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; }
.bpl-prev-title, .bpl-hints-title { font-size: 11px; font-weight: 800; color: var(--tx2); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
.bpl-prev-card { background: #fff; border: 1px solid var(--bd); border-radius: 14px; overflow: hidden; }
.bpl-prev-photo { padding: 8px 8px 0; }
.bpl-nophoto { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--tx2); border-radius: 8px; font-size: 12px; }
.bpl-prev-body { padding: 8px 12px 12px; }
.bpl-prev-price { font-size: 18px; font-weight: 800; }
.bpl-prev-name { font-weight: 700; font-size: 12.5px; }
.bpl-prev-cond { font-size: 11px; color: var(--tx2); margin-bottom: 6px; }
.bpl-prev-desc { font-size: 11.5px; color: #555; max-height: 120px; overflow: auto; }
.bpl-hints { background: #fff; border: 1px solid var(--bd); border-radius: 14px; padding: 12px; }
.bpl-hint { display: flex; gap: 7px; font-size: 12px; padding: 4px 0; line-height: 1.4; }
.bpl-hint i { font-style: normal; flex: 0 0 16px; text-align: center; }
.bpl-hint--risk span { color: #a3231f; }
.bpl-hint--warn span { color: #6b5300; }
.bpl-hint--tip  span { color: #2f5b8a; }
.bpl-hint--ok   span { color: #1a7f37; }
.bpl-actions { display: flex; flex-direction: column; gap: 6px; }
.bpl-actions .bp-btn { width: 100%; }

/* ── Mis anuncios ──────────────────────────────────────────────── */
.bp-ads { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.bp-ad { display: grid; grid-template-columns: 120px 1fr; gap: 12px; background: #fff; border: 1px solid var(--bd); border-radius: 14px; padding: 10px; }
.bp-ad-price { font-size: 18px; font-weight: 800; }
.bp-ad-title { font-weight: 700; font-size: 13px; }
.bp-ad-meta { font-size: 11.5px; color: var(--tx2); margin: 2px 0 6px; }
.bp-ad-note { font-size: 11.5px; color: var(--tx2); background: var(--bg); border-radius: 8px; padding: 5px 8px; margin-bottom: 8px; }
.bp-ad-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.bp-subhead { font-size: 14px; font-weight: 800; margin: 18px 0 8px; }
.bp-list-row--closed { opacity: .75; }

/* ── Inventario ────────────────────────────────────────────────── */
.bp-list--inv .bp-list-head, .bp-list--inv .bp-list-row { grid-template-columns: minmax(0, 1fr) 190px 70px 120px; }
.bp-list-sub { font-size: 11px; color: var(--tx2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-chip--listed { background: var(--gl); color: #0b7a6c; }
.bp-chip--g4 { background: #e2f7e6; color: #1a7f37; }
.bp-chip--g3 { background: #eef8e2; color: #4c7a12; }
.bp-chip--g2 { background: #fef3d7; color: #8a5a00; }
.bp-chip--g1 { background: #fde9d7; color: #a14a00; }
.bp-chip--g0 { background: #fde2e2; color: #a3231f; }
