/* ===== ROOT ===== */
#chart {
  width: 100%;
  --chart-left: 87px;
}

.chart-wrapper {
  display: flex;
  flex-direction: column;
}

/* ===== ЗОНА ГРАФИКА ===== */
.chart-plot {
  position: relative;
  min-height: 452px;
}

/* ===== Y AXIS ===== */
.y-axis {
  position: absolute;
  top: 28px;
  bottom: 0;
  width: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: right;
}

.y-axis span {
  font-size: 24px;
  line-height: 150%;
  color: #6c737f;
}

/* ===== BACKGROUND + CANVAS ===== */
.chart-bg {
  position: absolute;
  top: 28px;
  left: var(--chart-left);
  right: 0;
  bottom: 0;
  max-width: 1715px;
  background: #1d1d32;
  border-radius: 16px;
  border: 1px solid #2d2d41;
  overflow: hidden;
}

#chart-lines {
  width: 100%;
  height: 100%;
}

#chart-lines div canvas {
  height: 432px !important;
}

/* ===== X AXIS ===== */
.x-axis {
  margin-left: var(--chart-left);
  padding-top: 28px;
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  text-align: center;
}

.x-axis span {
  font-size: 24px;
  line-height: 150%;
  color: #6c737f;
}

/* ===== FOOTER ===== */
.chart-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 64px;
}

/* ===== LEGEND ===== */
.chart-legend {
  display: flex;
  gap: 64px;
}

.chart-legend .item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  line-height: 150%;
  color: #6c737f;
}

.chart-legend .dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 0 !important;
}

.chart-legend .abra .dot {
  background: #15eb64;
}
.chart-legend .btc .dot {
  background: #F7931A;
}

.chart-info {
  font-size: 24px;
  line-height: 150%;
  color: #6c737f;
  max-width: 845px;
}

/* ===== ADAPTIVE ===== */

@media (max-width: 1525px) {
  .chart-legend {
    display: flex;
    gap: 24px;
  }
}

@media (max-width: 1440px) {
  #chart {
    --chart-left: 63px;
  }

  .y-axis span {
    font-size: 16px;
  }

  .x-axis span {
    font-size: 16px;
  }

  .chart-legend {
    display: flex;
    gap: 64px;
  }

  .chart-legend .item {
    font-size: 16px;
  }

  .chart-info {
    font-size: 16px;
    max-width: 645px;
  }
}

@media (max-width: 1150px) {
  .chart-footer {
    padding-top: 32px;
  }

  .chart-legend {
    display: flex;
    gap: 32px;
  }

  .chart-info {
    font-size: 12px;
    max-width: 275px;
  }
}

@media (max-width: 768px) {
  #chart {
    --chart-left: 44px;
  }

  .y-axis span {
    font-size: 12px;
    text-align: left;
  }

  .x-axis span {
    font-size: 12px;
    color: #6c737f;
  }
}

@media (max-width: 675px) {
  .chart-legend {
    flex-direction: column;
    gap: 16px;
  }

  .chart-footer {
    align-items: baseline;
    gap: 24px;
    padding-top: 32px;
    flex-direction: column;
  }
}

@media (max-width: 550px) {
  #chart {
    --chart-left: 38px;
  }

  .x-axis {
    grid-template-columns: repeat(6, 1fr);
    padding-top: 12px;
  }

  .datex.xn {
    display: none !important;
  }
}
