/* pages/chart/chart.wxss */

.filter-section {
  margin: 0.2rem 0.24rem;
  padding: 0.24rem 0.28rem;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 0.16rem;
}

.filter-label {
  font-size: 0.26rem;
  color: var(--color-text-secondary);
  font-weight: 600;
  min-width: 0.6rem;
}

.pill-group-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12rem;
  flex: 1;
}

.pill-sm {
  height: 0.52rem;
  padding: 0 0.2rem;
  font-size: 0.24rem;
}

.filter-picker {
  display: flex;
  align-items: center;
  height: 0.6rem;
  padding: 0 0.24rem;
  background: #F0F0F5;
  border-radius: var(--radius-md);
  font-size: 0.26rem;
  color: var(--color-text);
  min-width: 2rem;
  justify-content: space-between;
}

.picker-current {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.picker-dot {
  width: 0.16rem;
  height: 0.16rem;
  border-radius: 50%;
}

.picker-arrow {
  font-size: 0.2rem;
  color: var(--color-text-secondary);
  margin-left: 0.16rem;
}

/* 信息条 */
.info-bar {
  display: flex;
  align-items: center;
  padding: 0.2rem 0.28rem;
  margin: 0 0.24rem 0.16rem;
}

.info-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.06rem;
}

.info-bar-label {
  font-size: 0.22rem;
  color: var(--color-text-secondary);
}

.info-bar-value {
  font-size: 0.26rem;
  font-weight: 600;
  color: var(--color-text);
}

.info-bar-divider {
  width: 0.02rem;
  height: 0.48rem;
  background: var(--color-border);
}

/* 图表区域 */
.chart-section {
  margin: 0 0.24rem 0.16rem;
  padding: 0.24rem 0.16rem;
  min-height: 5rem;
}

.chart-wrap {
  width: 100%;
  height: 4.8rem;
  position: relative;
}

.chart-canvas {
  width: 100%;
  height: 4.8rem;
}

/* 翻页导航 */
.chart-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0.24rem 0.16rem;
  padding: 0 0.08rem;
}

.chart-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0.64rem;
  padding: 0 0.32rem;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  font-size: 0.26rem;
  color: var(--color-primary);
  border: 0.01rem solid var(--color-border);
}

.chart-nav-btn.disabled {
  color: #C7C7CC;
  border-color: #E5E5EA;
}

.chart-nav-info {
  font-size: 0.24rem;
  color: var(--color-text-secondary);
}

/* 图例 */
.legend-section {
  margin: 0 0.24rem 0.4rem;
  padding: 0.2rem 0.28rem;
}

.legend-title {
  font-size: 0.24rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.16rem;
  font-weight: 600;
}

.legend-items {
  display: flex;
  gap: 0.4rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.12rem;
}

.legend-line {
  width: 0.36rem;
  height: 0.04rem;
  border-radius: 0.02rem;
}

.legend-area {
  width: 0.36rem;
  height: 0.2rem;
  background: rgba(52, 199, 89, 0.15);
  border: 0.01rem dashed rgba(52, 199, 89, 0.5);
  border-radius: 0.04rem;
}

.legend-text {
  font-size: 0.24rem;
  color: var(--color-text);
}

.loading-spinner {
  width: 0.48rem;
  height: 0.48rem;
  border: 0.04rem solid var(--color-border);
  border-top: 0.04rem solid var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== Web 版新增：select 下拉筛选器 ===== */

select.filter-picker {
  border: none;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 0.5rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%238E8E93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.2rem center;
  background-size: 0.24rem 0.16rem;
}

.chart-canvas {
  display: block;
  width: 100%;
  height: 4.8rem;
  touch-action: pan-y;
}
