.error-message {
  color: #ff4d4f;
  margin-top: 3px;
  font-size: 12px;
}

.highlighted {
  background-color: #3a3a3a;
}

.input {
  padding: 4px;
  border-radius: 4px;
  background-color: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
  width: 50%;
}

.trade-panel-bar {
  display: flex;
  align-items: center;
  gap: 5px;
}

.chart-button-container {
  display: flex;
  gap: 4px;
}

/* Seconds menu styling */
.seconds-button-container {
  position: relative;
  display: inline-block;
}

.seconds-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background-color: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px;
  z-index: 10;
  margin-bottom: 2px;
  box-shadow: 0 2px 8px var(--shadow);
  user-select: none;
}

.seconds-menu .chart-button {
  width: 100%;
  text-align: center;
  margin: 1px 0;
  border: none;
  border-radius: 2px;
}

.seconds-menu .chart-button:hover {
  background-color: rgba(180, 180, 249, 0.1);
  border-color: rgba(180, 180, 249, 0.25);
}

.seconds-menu .chart-button.selected {
  background-color: rgba(180, 180, 249, 0.15);
  border-color: rgba(180, 180, 249, 0.3);
}

.chart-button-container {
  display: flex;
  gap: 4px;
}

.chart-button {
  display: inline-block;
  cursor: pointer;
  background-color: var(--bg-deep);
  border: 1px solid rgba(180, 180, 249, 0.15);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 26px;
  font-family: 'Inter';
  font-weight: 500;
  font-size: 0.9em;
  padding: 0 4px;
  transition: all 0.2s ease;
  user-select: none;
}

.chart-button.selected {
  background-color: rgba(180, 180, 249, 0.15);
  border-color: rgba(180, 180, 249, 0.3);
  color: var(--text);
  font-weight: 500;
}

.chart-button:hover {
  background-color: rgba(180, 180, 249, 0.1);
  border-color: rgba(180, 180, 249, 0.25);
  color: var(--text);
}

.chart-button-icon {
  height: 1em;
  width: 1em;
  vertical-align: middle;
  display: inline-block;
}

.star-button {
  transition: transform 0.2s ease;
}

.star-button:hover {
  transform: scale(1.1);
}

.star-button:active {
  transform: scale(0.95);
}

.symbol-search-wrapper {
  flex: 1;
  min-width: 150px;
  margin: 0 8px;
}

.chart-indicators-container {
  position: relative;
  display: inline-block;
  user-select: none;
}

/* ── Shared chart popup styles (indicators, drawing tools, settings) ── */
.chart-popup {
  z-index: 10000;
  min-width: 150px;
  padding: 6px 8px;
  font-size: 12px;
  font-family: inherit;
  background: var(--bg-deep);
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px #000a;
  margin-bottom: 6px;
  user-select: none;
  color: var(--text);
}

.chart-popup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
  min-height: 26px;
  padding: 1px 4px;
  border-radius: 4px;
  cursor: default;
}

.chart-popup-row:last-child {
  margin-bottom: 0;
}

.chart-popup-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.chart-popup-row span {
  white-space: nowrap;
}

/* ── Indicator-specific ── */
.indicator-input {
  width: 32px;
  font-size: 12px;
  padding: 2px 3px;
  border-radius: 3px;
  border: 1px solid var(--border-light);
  background: var(--bg-alt);
  color: var(--text);
  text-align: center;
  margin-left: auto;
}

.indicator-plus {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  padding: 0 2px;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
  min-width: 20px;
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.indicator-plus:hover:not(:disabled) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}
.indicator-plus:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Drawing tool button ── */
.chart-popup-tool-btn {
  background: var(--bg-button);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  min-width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.chart-popup-tool-btn:hover {
  background: var(--scrollbar);
  border-color: #777;
}

.chart-popup-tool-btn.selected {
  background: #007ACC;
  border-color: #0098FF;
}

.chart-popup-tool-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Settings toggle ── */
.chart-settings-toggle {
  width: 28px;
  height: 14px;
  border-radius: 7px;
  background: var(--border-light);
  position: relative;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.chart-settings-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  transition: transform 0.2s ease, background 0.2s ease;
}

.chart-settings-toggle.active {
  background: #007ACC;
}

.chart-settings-toggle.active::after {
  transform: translateX(14px);
  background: #fff;
}

/* Legacy aliases so existing class names still resolve */
