@charset "utf-8";

.m-chart-page .m-app {
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
}

.m-chart-list {
  background: #fff;
}

.m-chart-card {
  padding: 14px 12px 18px;
  border-bottom: 8px solid #f0f0f0;
  background: #fff;
}

.m-chart-card.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow: auto;
  border-bottom: none;
  padding-bottom: 24px;
}

.m-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.m-chart-title {
  position: relative;
  padding-left: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #222;
  line-height: 1.3;
}

.m-chart-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 4px;
  background: var(--m-blue);
  border-radius: 2px;
}

.m-chart-period {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 13px;
  color: #333;
}

.m-chart-num {
  width: 52px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
  background: #fff;
}

.m-chart-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  min-height: 24px;
}

.m-chart-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #666;
}

.m-chart-legend i {
  display: inline-block;
  width: 14px;
  height: 10px;
  border-radius: 2px;
  background: var(--m-blue);
}

.m-chart-fs {
  border: none;
  background: none;
  color: var(--m-blue);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0 4px 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231a4594'%3E%3Cpath d='M4 10V4h6v2H6v4H4zm10-6h6v6h-2V6h-4V4zM4 20v-6h2v4h4v2H4zm16 0h-6v-2h4v-4h2v6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 16px 16px;
}

.m-chart-body {
  position: relative;
}

.m-chart-canvas {
  width: 100%;
  height: 260px;
}

.m-chart-card[data-key="specialNum"] .m-chart-canvas,
.m-chart-card[data-key="normalNum"] .m-chart-canvas {
  height: 300px;
}

.m-chart-card.is-fullscreen .m-chart-canvas {
  height: calc(100vh - 120px);
  min-height: 320px;
}

.m-chart-body--pie,
.m-chart-body--sx {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.m-chart-pie-legend,
.m-chart-sx-list {
  list-style: none;
  flex: 0 0 88px;
  margin: 0;
  padding: 8px 0 0;
}

.m-chart-pie-legend li,
.m-chart-sx-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #333;
  line-height: 1.2;
}

.m-chart-pie-legend i,
.m-chart-sx-list i {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.m-chart-sx-list .m-sx-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  font-style: normal;
}

.m-chart-body--pie .m-chart-canvas,
.m-chart-body--sx .m-chart-canvas {
  flex: 1;
  min-width: 0;
  height: 240px;
}

.m-chart-card.is-fullscreen .m-chart-body--pie .m-chart-canvas,
.m-chart-card.is-fullscreen .m-chart-body--sx .m-chart-canvas {
  height: calc(100vh - 140px);
}

.m-chart-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.8);
  z-index: 2;
}

@media (max-width: 360px) {
  .m-chart-pie-legend,
  .m-chart-sx-list {
    flex-basis: 76px;
    font-size: 11px;
  }
  .m-chart-title {
    font-size: 15px;
  }
}
