.trend-chart-card {
  padding: 16px;
}

.trend-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.trend-chart-head .sec-title {
  margin: 0 20px 14px 0;
  color: var(--accent);
  font-size: 16px;
  line-height: 1.4;
  text-align: left;
  font-weight: bold;
}

.trend-chart-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.trend-range-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: 8px;
  background: #eeeeee;
}

.trend-range-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  outline: 0;
  background: transparent;
  color: #222222;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.trend-range-tabs button:hover,
.trend-range-tabs button:focus-visible {
  background: #f8fafc;
  box-shadow: inset 0 0 0 2px rgba(18, 164, 186, 0.35);
}

.trend-range-tabs button.active,
.trend-range-tabs button.on {
  background: #ffffff;
  color: #111111;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12);
}

.trend-chart-plot {
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #fafbfc);
  overflow: visible;
}

.trend-chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12.5px;
}

.trend-chart-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
  background: #12a4ba;
  box-shadow: 0 0 0 3px rgba(18, 164, 186, 0.15);
  vertical-align: middle;
}

/* .trend-chart-plot svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 320px;
} */

.trend-chart-plot .trend-chart-canvas {
  display: block;
  width: 100%;
  height: auto;
  /* height: 400px; */
  min-height: 320px;
}

.trend-chart-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed #e5e7eb;
}

.trend-chart-stats .stat {
  padding: 0 16px;
  border-right: 1px solid #e5e7eb;
}

.trend-chart-stats .stat:first-child {
  padding-left: 4px;
}

.trend-chart-stats .stat:last-child {
  border-right: 0;
}

.trend-chart-stats span {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.trend-chart-stats span span {
  display: inline;
}

.trend-chart-stats strong {
  display: block;
  margin-top: 4px;
  color: #333333;
  font-size: 20px;
  line-height: 1.2;
}

.trend-chart-stats .trend-diff {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}

.trend-chart-stats .trend-diff.is-positive {
  color: #1f9d55;
}

.trend-chart-stats .trend-diff.is-negative {
  color: #d75a7a;
}

.trend-chart-stats .stat:first-child strong {
  color: #c94b38;
}


@media (max-width: 767px) {
  .trend-card.trend-chart-card {
    padding: 12px 10px 16px;
  }

  .trend-chart-head {
    display: block;
    margin-bottom: 12px;
  }

  .trend-chart-head .sec-title {
    text-align: left;
    color: var(--accent);
    font-size: 16px;
    line-height: 1.4;
  }

  .trend-chart-head p {
    /* display: none; */
  }



  .trend-range-tabs {
    gap: 3px;
    margin-bottom: 10px;
    padding: 3px;
    border-radius: 8px;
  }

  .trend-range-tabs button {
    min-height: 30px;
    border-radius: 4px;
    font-size: 10px;
  }

  .trend-chart-plot {
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .trend-chart-plot .trend-chart-canvas {
    display: block;
    width: 100%;
    height: auto;
    /* height: 400px; */
    min-height: 280px;
  }

  .trend-chart-legend {
    /* display: none; */
  }

  /* .trend-chart-plot svg {
    min-height: 0;
    max-width: 100%;
  } */

  .trend-chart-stats {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 14px;
    padding-top: 0;
    border-top: 1px solid #e1e5ea;
  }

  .trend-chart-stats .stat {
    padding: 12px 10px 10px;
    border-right: 0;
  }

  .trend-chart-stats .stat:nth-child(2n) {
    border-left: 1px solid #e1e5ea;
  }

  .trend-chart-stats .stat:nth-child(n+3) {
    border-top: 1px solid #e1e5ea;
  }

  .trend-chart-stats span {
    font-size: 12px;
    letter-spacing: 0;
  }

  .trend-chart-stats strong {
    margin-top: 5px;
    font-size: 14px;
    line-height: 1.2;
  }
}

/* .trend-chart-card {
  padding: 2px 0 6px;
}

.trend-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.trend-chart-kicker {
  margin: 0 0 6px;
  color: #777777;
  font-size: 13px;
  font-weight: 700;
}

.trend-chart-head h3 {
  margin: 0;
  color: #222222;
  font-size: 26px;
  line-height: 1.3;
}

.trend-chart-head p:not(.trend-chart-kicker) {
  margin: 8px 0 0;
  color: #777777;
  font-size: 13px;
}

.trend-current-price {
  flex: 0 0 auto;
  min-width: 172px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fafafa;
  text-align: right;
}

.trend-current-price span {
  display: block;
  color: #777777;
  font-size: 12px;
  font-weight: 700;
}

.trend-current-price strong {
  display: block;
  margin-top: 2px;
  color: #c94b38;
  font-size: 24px;
  line-height: 1.2;
}

.trend-range-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: 8px;
  background: #eeeeee;
}

.trend-range-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  outline: 0;
  background: transparent;
  color: #222222;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.trend-range-tabs button:hover,
.trend-range-tabs button:focus-visible {
  background: #f8fafc;
  box-shadow: inset 0 0 0 2px rgba(18, 164, 186, 0.35);
}

.trend-range-tabs button.active {
  background: #ffffff;
  color: #111111;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.12);
}

.trend-chart-plot {
  padding: 4px 0 0;
}

.trend-chart-plot .trend-chart-canvas {
  display: block;
  width: 100%;
  height: auto;
  /* height: 400px; 
  min-height: 320px;
}

.trend-grid line {
  stroke: #dfe3e8;
  stroke-width: 1.2;
}

.trend-axis-labels text {
  fill: #666666;
  font-size: 16px;
  font-weight: 400;
}

.trend-y-labels text {
  text-anchor: start;
}

.trend-x-labels text {
  text-anchor: middle;
}

.trend-area-path {
  fill: url("#trend-area-gradient");
}

.trend-line-path {
  fill: none;
  stroke: #12a4ba;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-point-layer circle {
  fill: #ffffff;
  stroke: #12a4ba;
  stroke-width: 2.4;
} */

/* .price-trend-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-top: 12px;
  padding: 6px 14px;
  border: 1px solid var(--teal);
  border-radius: 3px;
  background: #ffffff;
  color: var(--teal-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.price-trend-button:hover,
.price-trend-button:focus-visible {
  background: var(--pale);
} */

@media (max-width: 520px) {
  /* .price-trend-dialog {
    width: calc(100% - 20px);
    margin: 10px auto;
    max-height: calc(100vh - 20px);
  }

  .price-trend-header {
    min-height: 54px;
    padding: 12px 14px;
  }

  .price-trend-header h2 {
    font-size: 20px;
  }

  .price-trend-body {
    padding: 14px;
  }

  .trend-chart-head {
    display: block;
    margin-bottom: 14px;
  }

  .trend-chart-head h3 {
    font-size: 20px;
  }

  .trend-current-price {
    margin-top: 12px;
    text-align: left;
  }

  .trend-range-tabs {
    gap: 3px;
    margin-bottom: 14px;
    padding: 3px;
  }

  .trend-range-tabs button {
    min-height: 36px;
    font-size: 13px;
  }

  .trend-chart-plot svg {
    min-width: 620px;
    min-height: 280px;
  } */
}