/* Swap trend chart — matches yl-box / calculator styling on copi-tools.com */
.stc-chart {
  padding: 0.75rem 1rem;
  background-color: #f6f6f6;
  border-radius: 8px;
  margin: 1em 0;
  box-sizing: border-box;
}

.stc-chart__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.stc-chart__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #1f2937;
}

.stc-chart__side {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
}

.stc-chart__side button {
  cursor: pointer;
  border: 0;
  margin: 0;
  padding: 7px 14px;
  font-size: 14px;
  line-height: 1.4;
  background: #fff;
  color: #374151;
  transition: background-color 0.2s, color 0.2s;
}

.stc-chart__side button[aria-selected="true"] {
  background: var(--color_main, #2f6fed);
  color: #fff;
  font-weight: 600;
}

.stc-chart__side button:focus-visible {
  outline: 2px solid var(--color_main, #2f6fed);
  outline-offset: 2px;
}

.stc-chart__brokers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
}

.stc-chart__broker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  user-select: none;
}

.stc-chart__broker input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.stc-chart__swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: opacity 0.2s;
}

.stc-chart__broker input:not(:checked) + .stc-chart__swatch {
  opacity: 0.25;
}

.stc-chart__broker input:not(:checked) ~ .stc-chart__broker-name {
  opacity: 0.45;
}

.stc-chart__canvas-wrap {
  background: #fff;
  border-radius: 6px;
  padding: 12px 8px 4px;
  border: 1px solid #e5e7eb;
}

.stc-chart__canvas-wrap canvas {
  display: block;
  width: 100% !important;
  max-height: 420px;
}

.stc-chart__foot {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #6b7280;
}

.stc-chart__note {
  margin: 6px 0 0;
  font-size: 12px;
  color: #9ca3af;
}

@media screen and (max-width: 768px) {
  .stc-chart {
    padding: 0.65rem 0.75rem;
  }

  .stc-chart__title {
    font-size: 0.95rem;
  }

  .stc-chart__side button {
    padding: 6px 10px;
    font-size: 13px;
  }

  .stc-chart__brokers {
    gap: 6px 10px;
  }

  .stc-chart__broker {
    font-size: 13px;
  }
}
