/* ── Chart Popup — cp- prefix ─────────────────────────────────────────────── */

.cp-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 2px;
  flex-shrink: 0;
}

.cp-tf-group,
.cp-style-group {
  display: flex;
  gap: 2px;
}

.cp-sep {
  width: 1px;
  height: 14px;
  background: #2a3347;
  margin: 0 2px;
  flex-shrink: 0;
}

.cp-tf-btn,
.cp-style-btn {
  background: #1e2535;
  color: #d1d4dc;
  border: none;
  padding: 3px 7px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .15s, color .15s;
}

.cp-tf-btn:hover,
.cp-style-btn:hover {
  background: #2a3347;
  color: #fff;
}

.cp-tf-btn.cp-active,
.cp-style-btn.cp-active {
  background: #2962ff;
  color: #fff;
}

/* ── Overlay ── */
.cp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* ── Container ── */
.cp-container {
  background: #131722;
  border-radius: 8px;
  padding: 12px;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* ── Header ── */
.cp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cp-symbol {
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.cp-close {
  background: none;
  border: none;
  color: #d1d4dc;
  cursor: pointer;
  font-size: 18px;
  padding: 0 4px;
  line-height: 1;
  border-radius: 3px;
  transition: background .15s, color .15s;
}

.cp-close:hover {
  background: #1e2535;
  color: #fff;
}

/* ── Chart wrap ── */
.cp-chart-wrap {
  height: 300px;
  position: relative;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  background: #131722;
}

/* ── Spinner ── */
.cp-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #131722;
}

.cp-spinner::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 3px solid #1e2535;
  border-top-color: #2962ff;
  border-radius: 50%;
  animation: cp-spin 0.7s linear infinite;
}

@keyframes cp-spin {
  to { transform: rotate(360deg); }
}

/* ── Error ── */
.cp-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 13px;
  background: #131722;
}

/* ── Footer ── */
.cp-footer {
  font-size: 10px;
  color: #475569;
  text-align: center;
}

/* ── Mobile ── */
@media (max-width: 560px) {
  .cp-container {
    margin: 0;
  }
  .cp-chart-wrap {
    height: 220px;
  }
}

@media (max-width: 768px) {
  .cp-controls {
    display: none !important;
  }
}
