/* ─────────────────────────────────────────────────────────────────────────
   propiedades-plus.css · Inventario completo (operaciones múltiples,
   características, filtros avanzados, mapa y acciones en lote).
   Sólo tokens del sistema de diseño (brokr-theme.css).
   ───────────────────────────────────────────────────────────────────────── */

/* ── Editor de operaciones ── */
.px-ops { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.px-op {
  display: grid; gap: var(--sp-2); align-items: end;
  grid-template-columns: minmax(140px, 1.3fr) minmax(120px, 1.2fr) 88px minmax(110px, 1fr) 40px;
  padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r);
  background: var(--paper);
}
.px-op .pf-field { gap: 4px; }
.px-op__del {
  width: 40px; height: 44px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--bone); color: var(--mute); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.px-op__del:hover { color: var(--danger); border-color: var(--danger-bd); }
.px-op__del[disabled] { opacity: .35; cursor: not-allowed; }
.px-add {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  height: var(--ui-control-small); padding: 0 16px; border-radius: var(--r-pill);
  border: 1px solid var(--ui-border); background: transparent; color: var(--ink-2);
  font: inherit; font-size: var(--fs-sm); cursor: pointer;
}
.px-add:hover { border-color: var(--ink); color: var(--ink); }
@media (max-width: 640px) {
  .px-op { grid-template-columns: 1fr 1fr; }
  .px-op .px-op__tipo, .px-op .px-op__precio { grid-column: span 2; }
  .px-op__del { grid-column: 2; justify-self: end; }
}

/* ── Casillas de características ── */
.bk-car-grupo { border: 0; margin: 0 0 var(--sp-3); padding: 0; min-width: 0; }
.bk-car-grupo legend {
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2);
  padding: 0; margin-bottom: var(--sp-2);
}
.bk-car-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px var(--sp-3); }
.bk-car-item {
  display: flex; align-items: center; gap: 8px; min-height: 32px;
  font-size: var(--fs-sm); color: var(--ink); cursor: pointer;
}
.bk-car-item input { width: 18px; flex-shrink: 0; accent-color: var(--ink); cursor: pointer; }
.px-car-wrap { max-height: 360px; overflow-y: auto; padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }

/* ── Botones extra de la barra de filtros ── */
.px-tool-btn {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; cursor: pointer;
}
.px-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--bone); font-size: var(--fs-label-3);
  display: inline-flex; align-items: center; justify-content: center;
}

/* ── Panel de filtros ── */
.px-fil-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-3); }
.px-fil-lista {
  max-height: 180px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r);
  padding: var(--sp-2) var(--sp-3); background: var(--paper);
}
.px-fil-lista .bk-car-item { min-height: 30px; }
.px-fil-buscar { margin-bottom: 6px; }
.px-fil-vacio { font-size: var(--fs-xs); color: var(--mute); padding: 4px 0; }

/* ── Mapa ── */
.px-map {
  display: none; height: min(62vh, 560px); margin: 0 var(--pad-x, 24px) var(--sp-5);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--paper-2);
}
.px-map.is-open { display: block; }
.px-map-aviso { margin: 0 var(--pad-x, 24px) var(--sp-3); font-size: var(--fs-xs); color: var(--mute); display: none; }
.px-map-aviso.is-open { display: block; }
.px-pop { font-family: var(--font-sans); min-width: 180px; }
.px-pop img { width: 100%; height: 96px; object-fit: cover; border-radius: var(--r-sm); margin-bottom: 6px; }
.px-pop strong { display: block; font-size: var(--fs-sm); color: var(--ink); }
.px-pop span { display: block; font-size: var(--fs-xs); color: var(--mute); }
.px-pop a { font-size: var(--fs-xs); color: var(--ink); font-weight: 600; }
@media (max-width: 720px) { .px-map { margin: 0 16px var(--sp-4); height: 60vh; } .px-map-aviso { margin: 0 16px var(--sp-3); } }

/* ── Acciones en lote ── */
.px-bulk-menu { position: relative; }
.px-bulk-pop {
  display: none; position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  min-width: 220px; background: var(--bone); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 6px; z-index: var(--z-popover, 400);
}
.px-bulk-pop.is-open { display: block; }
.px-bulk-pop button {
  display: flex; width: 100%; align-items: center; gap: 8px; text-align: left; cursor: pointer;
}
.px-bulk-pop hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* ── Ficha: operaciones y características ── */
.px-ficha-ops { display: flex; flex-direction: column; gap: 6px; margin: var(--sp-2) 0; }
.px-ficha-op { display: flex; justify-content: space-between; gap: var(--sp-3); font-size: var(--fs-sm); }
.px-ficha-op span:first-child { color: var(--mute); }
.px-ficha-op span:last-child { font-weight: 600; color: var(--ink); text-align: right; }
.px-ficha-car { margin-bottom: var(--sp-3); }
.px-ficha-car h5 { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.px-ficha-car div { display: flex; flex-wrap: wrap; gap: 6px; }

/* Los modales de propiedades-plus van encima de la barra de selección
   (z-index 900), que si no tapaba el botón "Aplicar" en celular. */
#px-fil-modal, #px-bulk-modal { z-index: 950; }

/* Las casillas viven dentro de .pf-field, cuyo estilo de input (100% de ancho,
   44px de alto) las deformaba. */
.pf-field .bk-car-item input[type="checkbox"],
.bk-car-item input[type="checkbox"] {
  width: 18px; height: 18px; min-width: 18px; padding: 0; margin: 0;
  border-radius: var(--r-xs); box-shadow: none;
}

/* ── Multimedia ── */
.px-nota { font-size: var(--fs-xs); color: var(--mute); margin-top: 6px; }
.px-file { padding: 10px !important; height: auto !important; border: 2px dashed var(--line-2) !important; background: var(--paper) !important; cursor: pointer; }
.px-docs { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.px-docs li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.px-docs li a { font-size: var(--fs-sm); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-docs .px-op__del { width: 32px; height: 32px; }
.foto-preview-item.px-baja-res { outline: 2px solid var(--warn); outline-offset: -2px; }
.px-baja-res__tag {
  position: absolute; left: 4px; bottom: 4px; padding: 2px 6px; border-radius: var(--r-pill);
  background: var(--warn); color: var(--bone); font-size: var(--fs-label-3); font-weight: 600; pointer-events: none;
}
