
.bv-root{border:1px solid #e5e7eb;border-radius:10px;padding:12px}
.bv-layout{display:grid;grid-template-columns: 1.2fr 0.8fr;gap:12px}
@media (max-width: 900px){.bv-layout{grid-template-columns:1fr}.bv-side{order:2}}
.bv-plan-wrap{position:relative;border-radius:10px;overflow:hidden;border:1px solid #e5e7eb}
.bv-plan-wrap img{display:block;width:100%;height:auto}
.bv-overlay{position:absolute;top:0;left:0;width:100%;height:100%}
.bv-side{border:1px solid #e5e7eb;border-radius:10px;padding:10px}
.bv-filters{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.bv-chip{border:1px solid #d1d5db;border-radius:999px;padding:4px 10px;background:#fff;cursor:pointer;font-size:13px}
.bv-chip[aria-pressed="true"]{border-color:#111827}
.bv-list{max-height:520px;overflow:auto;border-top:1px solid #e5e7eb;padding-top:8px}
.bv-row{display:flex;justify-content:space-between;gap:10px;padding:8px;border-radius:8px;cursor:pointer}
.bv-row:hover{background:#f3f4f6}
.bv-row.is-selected{border:2px solid #6b7280;background:rgba(16,185,129,0.14)}
.bv-badge{font-size:12px;border-radius:999px;padding:2px 8px;border:1px solid #d1d5db}
.bv-modal{position:fixed;inset:0;background:rgba(0,0,0,0.55);display:none;align-items:center;justify-content:center;z-index:99999;padding:20px;box-sizing:border-box;}
.bv-modal.is-open{display:flex}
.bv-modal-card{background:#fff;border-radius:12px;max-width:768px;width:min(92vw,768px);max-height:90vh;display:flex;flex-direction:column;overflow:hidden;padding:14px;box-sizing:border-box;}
.bv-modal-head{position:absolute;top:14px;right:14px;left:auto;z-index:10;pointer-events:none;display:block;}
.bv-close{border:0;background:transparent;font-size:22px;cursor:pointer}
.bv-kfacts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.bv-kfacts div{border:1px solid #e5e7eb;border-radius:10px;padding:10px}
.bv-actions{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
.bv-btn{display:inline-block;border:1px solid #111827;border-radius:10px;padding:8px 12px;text-decoration:none}
.bv-btn.primary{background:#111827;color:#fff}
.bv-tooltip{position:absolute;pointer-events:none;background:#111827;color:#fff;padding:6px 8px;border-radius:8px;font-size:12px;display:none;z-index:10;max-width:220px}
.bv-error{padding:10px;border:1px solid #fecaca;background:#fff1f2;border-radius:10px}

/* Layout variants */
.bv-root[data-layout="right"] .bv-layout{grid-template-columns: 1.2fr 0.8fr;}
.bv-root[data-layout="left"] .bv-layout{grid-template-columns: 0.8fr 1.2fr;}
.bv-root[data-layout="left"] .bv-plan{order:2;}
.bv-root[data-layout="left"] .bv-side{order:1;}
.bv-root[data-layout="below"] .bv-layout{grid-template-columns:1fr;}
.bv-root[data-layout="below"] .bv-plan{order:1;}
.bv-root[data-layout="below"] .bv-side{order:2;}
.bv-root[data-layout="below"] .bv-plan-wrap{width:100%;}

/* Polygon hover/selection transitions */
.bv-overlay path{transition: stroke-width .12s ease, stroke .12s ease, opacity .12s ease, fill-opacity .12s ease;}
.bv-overlay path.bv-hover{stroke: var(--bv-accent-rgba, rgba(255,255,255,0.95)); stroke-width: 3.2;}
.bv-overlay path.bv-selected{stroke: rgba(17,24,39,0.95); stroke-width: 3.0;}


.bv-close{line-height:1;}

.bv-root{position:relative;}

.bv-overlay path.bv-hover, .bv-overlay path.bv-selected{filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));}

.bv-row.is-hover{background:#e5e7eb}

.bv-row{box-sizing:border-box}

/* List row visual states (ensure selected wins over hover) */
.bv-row.is-hover{background:#e5e7eb}
.bv-row.is-selected{border:2px solid #6b7280;background:rgba(16,185,129,0.14)}
.bv-row.is-selected.is-hover{background:rgba(16,185,129,0.18)}


/* Hover effects (configurable via plan settings) */
.bv-root[data-hover-effect="pulse"] .bv-overlay path.bv-hover{
  animation: bvPulse 1.15s ease-in-out infinite;
}
.bv-root[data-hover-effect="glow"] .bv-overlay path.bv-hover{
  filter: drop-shadow(0 0 6px var(--bv-accent-rgba, rgba(255,255,255,0.7)));
}
.bv-root[data-hover-effect="border"] .bv-overlay path.bv-hover{
  stroke-width: 4.2;
}
@keyframes bvPulse{
  0%{opacity:1}
  50%{opacity:0.55}
  100%{opacity:1}
}

.bv-filter-range{display:flex;align-items:center;gap:6px;padding:4px 6px;border:1px solid #d1d5db;border-radius:999px;background:#fff}
.bv-filter-label{font-size:12px;color:#374151}
.bv-range-input{width:92px;border:1px solid #d1d5db;border-radius:8px;padding:3px 6px;font-size:12px}
.bv-chip-clear{background:#f9fafb}


/* Filter panel */
.bv-filters-container{background:#f5f7f9;border:1px solid #e6e9ec;border-radius:10px;padding:10px;margin-bottom:12px}
.bv-filters-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;background:transparent;border:none;padding:8px 6px;cursor:pointer;text-align:left}
.bv-filters-toggle-left{display:flex;flex-direction:column;gap:2px}
.bv-filters-title{font-weight:800;font-size:18px;line-height:1.1}
.bv-filters-meta{font-size:12px;color:#6b7280;min-height:14px}
.bv-filters-toggle-right{display:flex;align-items:center;gap:10px}
.bv-filters-chevron{font-size:14px;color:#6b7280}
.bv-filters-body{padding:8px 6px 6px 6px;border-top:1px solid #e6e9ec}
.bv-filters-body.is-collapsed{display:none}

.bv-filter-grid{display:flex;flex-direction:column;gap:10px}
.bv-filter-grid-row{display:grid;gap:12px}
.bv-filter-grid-row--chips{grid-template-columns:repeat(3,minmax(0,1fr))}
.bv-filter-grid-row--ranges{grid-template-columns:repeat(2,minmax(0,1fr))}
.bv-filter-col{padding-left:0}
.bv-filter-col + .bv-filter-col{border-left:1px solid #e6e9ec;padding-left:12px}
.bv-filter-title{font-weight:700;margin-bottom:4px}
.bv-filter-help{font-size:12px;color:#6b7280;margin-bottom:6px}
.bv-filter-control{display:block}
.bv-filter-chips{display:flex;flex-wrap:wrap;gap:6px}
.bv-filter-select{width:100%;max-width:100%}

.bv-filter-actions{padding-top:10px;border-top:1px solid #e6e9ec;margin-top:4px;display:flex;justify-content:flex-start}
.bv-filter-reset{background:#fff;border:1px solid #9ca3af;border-radius:10px;padding:8px 12px;cursor:pointer;font-weight:700}
.bv-filter-reset:hover{background:#f3f4f6}
.bv-filter-reset--mini{padding:6px 10px;border-radius:999px;font-weight:700}

@media (max-width: 860px){
  .bv-filter-grid-row--chips{grid-template-columns:1fr}
  .bv-filter-grid-row--ranges{grid-template-columns:1fr}
  .bv-filter-col + .bv-filter-col{border-left:none;padding-left:0;border-top:1px solid #e6e9ec;padding-top:10px;margin-top:6px}
}


/* Extended unit modal content */
.bv-unit-modal-body{display:flex;flex-direction:column;gap:16px;margin-top:0;overflow-y:auto;overflow-x:hidden;min-height:0;flex:1 1 auto;padding-right:2px;}
.bv-unit-gallery{display:flex;flex-direction:column;gap:10px;}
.bv-unit-gallery-main{border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;background:#fff;}
.bv-unit-gallery-main img{display:block;width:100%;max-height:420px;object-fit:cover;}
.bv-unit-gallery-thumbs{display:flex;gap:8px;flex-wrap:wrap;}
.bv-unit-gallery-thumbbtn{border:2px solid transparent;border-radius:10px;padding:0;overflow:hidden;background:#fff;cursor:pointer;}
.bv-unit-gallery-thumbbtn img{display:block;width:84px;height:64px;object-fit:cover;}
.bv-unit-gallery-thumbbtn.is-active{border-color:#6b7280;}
.bv-unit-description h4,
.bv-unit-keywords h4{margin:0 0 8px 0;font-size:15px;}
.bv-unit-description-text{color:#374151;line-height:1.6;}
.bv-unit-keywords-list{margin:0;padding-left:18px;color:#374151;line-height:1.6;}


.bv-unit-modal-titleblock{display:flex;flex-direction:column;gap:2px;}
.bv-unit-facts-wrap{background:#f7f8fa;border:1px solid #e5e7eb;border-radius:12px;padding:12px;}
.bv-unit-keywords-tags{display:flex;flex-wrap:wrap;gap:8px;}
.bv-unit-keyword-tag{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:#eef4fb;border:1px solid #c3d6ec;font-size:13px;line-height:1.3;color:#1f2937;}
.bv-unit-description-text{color:#374151;line-height:1.7;}


/* Modal polish */
.bv-modal-card{max-width:768px;}
.bv-modal.is-open .bv-modal-card{animation:bvFadeInDown .28s ease;}
@keyframes bvFadeInDown{
  from{opacity:0;transform:translate3d(0,-18px,0);}
  to{opacity:1;transform:translate3d(0,0,0);}
}

.bv-unit-facts-wrap{padding:6px 8px;}
.bv-unit-facts-wrap .bv-kfacts{margin-top:0;gap:8px;}
.bv-unit-facts-wrap .bv-kfacts div{padding:8px;}

@media (prefers-reduced-motion: reduce){
  .bv-modal.is-open .bv-modal-card{animation:none;}
}


@media (prefers-reduced-motion: reduce){
  .bv-modal.is-open .bv-modal-card{animation:none;}
}


/* Modal polish v0.3.21.4 */
.bv-modal.is-open .bv-modal-card{animation:bvFadeInDown .28s ease;}
@keyframes bvFadeInDown{
  from{opacity:0;transform:translate3d(0,-18px,0);}
  to{opacity:1;transform:translate3d(0,0,0);}
}
.bv-close-overlay{
  pointer-events:auto;
  width:36px;
  height:36px;
  border-radius:999px;
  background:rgba(243,244,246,0.96);
  color:#374151;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 1px 4px rgba(0,0,0,0.22);
  border:1px solid rgba(0,0,0,0.06);
}
.bv-unit-gallery-hero{
  margin:0 0 12px 0;
}
.bv-unit-gallery-hero .bv-unit-gallery-main{
  border-radius:12px;
}
.bv-unit-gallery-hero .bv-unit-gallery-main img{
  max-height:420px;
}
.bv-unit-gallery-hero .bv-unit-gallery-thumbs{
  padding:0;
}
.bv-unit-facts-wrap{padding:6px 8px;}
.bv-unit-facts-wrap .bv-kfacts{margin-top:0;gap:8px;}
.bv-unit-facts-wrap .bv-kfacts div{padding:8px;}
.bv-actions{padding-top:6px;flex:0 0 auto;}

@media (prefers-reduced-motion: reduce){
  .bv-modal.is-open .bv-modal-card{animation:none;}
}


/* Close button visibility fix v0.3.21.5 */
.bv-modal-card{position:relative;}
.bv-unit-gallery,
.bv-unit-gallery-hero,
.bv-unit-gallery-main,
.bv-unit-gallery-main img,
.bv-unit-gallery-thumbs{position:relative;z-index:1;}
.bv-modal-head{position:absolute;top:2px;right:2px;left:auto;z-index:30 !important;pointer-events:none;width:auto;height:auto;}
.bv-close,
.bv-close-overlay{
  pointer-events:auto;
  position:relative;
  z-index:31 !important;
  width:36px;
  height:36px;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.08);
  background:rgba(243,244,246,0.98);
  color:#374151 !important;
  font-size:24px;
  font-weight:700;
  line-height:1;
  padding:0;
  opacity:1 !important;
  visibility:visible !important;
}
.bv-close-overlay:hover{background:rgba(229,231,235,0.98);}
