/* HousePermits Live Metro Data UI v1.1.2
   Scope: Live Data page Metro / City Feeds tab only. */
.chp-chart-wrap.hp-metro-mode {
  min-height: 330px;
  display: block;
  padding: 0;
  overflow: visible;
  height: auto !important;
  max-height: none !important;
}
.chp-chart-wrap.hp-metro-mode canvas,
.chp-chart-wrap.hp-metro-mode .chp-chart-callout {
  display: none !important;
}
.hp-metro-visual-panel {
  display: none;
  width: 100%;
  min-height: 330px;
}
.chp-chart-wrap.hp-metro-mode .hp-metro-visual-panel {
  display: block;
}
.hp-metro-shell {
  min-height: 330px;
  border: 1px solid rgba(37, 99, 235, .14);
  background:
    radial-gradient(circle at 18% 12%, rgba(37,99,235,.10), transparent 34%),
    radial-gradient(circle at 82% 10%, rgba(124,58,237,.10), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-radius: 18px;
  padding: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}
.hp-metro-shell.is-empty,
.hp-metro-shell.is-error {
  display: grid;
  place-items: center;
  text-align: center;
}
.hp-metro-empty-inner,
.hp-metro-error-inner {
  max-width: 720px;
}
.hp-metro-empty-inner .hp-metro-icon,
.hp-metro-error-inner .hp-metro-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 12px;
  background: #eef4ff;
  color: #2459ff;
  font-weight: 800;
  font-size: 25px;
  box-shadow: 0 14px 30px rgba(37,99,235,.15);
}
.hp-metro-error-inner .hp-metro-icon {
  color: #b45309;
  background: #fff7ed;
}
.hp-metro-empty-actions {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hp-metro-chip {
  border: 1px solid rgba(37,99,235,.18);
  background: #fff;
  color: #1d4ed8;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.hp-metro-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 17px;
}
.hp-metro-eyebrow {
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.hp-metro-title {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.05;
  margin: 0;
  color: #07162d;
}
.hp-metro-source {
  margin-top: 8px;
  color: #61718c;
  font-size: 13px;
}
.hp-metro-badge {
  white-space: nowrap;
  border: 1px solid rgba(16,185,129,.18);
  background: #ecfdf5;
  color: #047857;
  font-weight: 900;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 12px;
}
.hp-metro-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.hp-metro-kpi {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 16px;
  padding: 13px 14px;
  box-shadow: 0 10px 24px rgba(15,23,42,.05);
}
.hp-metro-kpi span {
  display: block;
  color: #66758d;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 5px;
}
.hp-metro-kpi strong {
  color: #07162d;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.03em;
}
.hp-metro-kpi small {
  display: block;
  margin-top: 6px;
  color: #6b7890;
}
.hp-metro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr);
  gap: 16px;
  align-items: stretch;
}
.hp-metro-chart-card,
.hp-metro-side-card {
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 14px 30px rgba(15,23,42,.05);
}
.hp-metro-chart-title,
.hp-metro-side-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 900;
  color: #13213a;
}
.hp-metro-svg {
  width: 100%;
  height: 170px;
  display: block;
  overflow: visible;
}
.hp-metro-svg text {
  font-family: inherit;
  fill: #6b7890;
  font-size: 10px;
}
.hp-metro-bars-mini {
  display: grid;
  gap: 10px;
}
.hp-metro-mini-row {
  display: grid;
  grid-template-columns: 90px 1fr 64px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.hp-metro-mini-row span:first-child {
  color: #607089;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hp-metro-mini-row b {
  text-align: right;
  color: #07162d;
}
.hp-metro-mini-bar {
  height: 10px;
  border-radius: 999px;
  background: #edf2fb;
  overflow: hidden;
}
.hp-metro-mini-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
}
.hp-metro-split {
  margin-top: 12px;
}
.hp-metro-split-track {
  overflow: hidden;
  height: 14px;
  display: flex;
  border-radius: 999px;
  background: #edf2fb;
  border: 1px solid rgba(15,23,42,.06);
}
.hp-metro-split-track i:first-child {
  background: #2563eb;
}
.hp-metro-split-track i:last-child {
  background: #7c3aed;
}
.hp-metro-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: #5c6b83;
}
.hp-metro-dot:before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2563eb;
  margin-right: 6px;
}
.hp-metro-dot.multi:before {
  background: #7c3aed;
}
.hp-metro-detail {
  margin-top: 18px;
}
.hp-metro-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.hp-metro-detail-head strong {
  font-size: 16px;
}
.hp-metro-table-wrap {
  overflow: auto;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 14px;
  background: #fff;
}
.hp-metro-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.hp-metro-table-wrap th,
.hp-metro-table-wrap td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(15,23,42,.07);
  font-size: 13px;
}
.hp-metro-table-wrap th {
  color: #42516b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: #f7faff;
}
.hp-metro-table-wrap tr:last-child td {
  border-bottom: 0;
}
.hp-metro-status-pill {
  display: inline-flex;
  max-width: 180px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef4ff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 11px;
}
@media (max-width: 900px) {
  .hp-metro-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-metro-grid { grid-template-columns: 1fr; }
  .hp-metro-head { flex-direction: column; }
  .hp-metro-badge { white-space: normal; }
}
@media (max-width: 560px) {
  .hp-metro-shell { padding: 16px; }
  .hp-metro-kpis { grid-template-columns: 1fr; }
  .hp-metro-mini-row { grid-template-columns: 72px 1fr 46px; }
}


/* v1.1.2 responsive chart-panel fix */
.chp-chart-wrap.hp-metro-mode,
.chp-chart-wrap.hp-metro-mode .hp-metro-visual-panel,
.chp-chart-wrap.hp-metro-mode .hp-metro-shell {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.hp-metro-chart-card,
.hp-metro-side-card {
  min-height: 0;
  overflow: visible;
}

.hp-metro-chart-card {
  display: flex;
  flex-direction: column;
}

.hp-metro-svg {
  width: 100%;
  height: auto;
  min-height: 220px;
  aspect-ratio: 760 / 180;
  max-width: 100%;
}

.hp-metro-detail,
.hp-metro-table-wrap {
  max-width: 100%;
}

@media (max-width: 1100px) {
  .hp-metro-svg { min-height: 200px; }
}

@media (max-width: 700px) {
  .hp-metro-svg { min-height: 180px; }
}

@media (max-width: 560px) {
  .hp-metro-svg { min-height: 160px; }
}
