/* chart.indicators.menu.css - styling for the "+ Indicator" modal, chips bar,
   and per-indicator params editor. English only, no external assets. */

#chartAddIndBtn {
  background: linear-gradient(135deg, #2d2dab, #3d5afe);
  color: #fff;
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
#chartAddIndBtn:hover {
  background: linear-gradient(135deg, #3d3dc8, #5c6bff);
}

#chartChipsBar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 28px;
  flex: 1 1 auto;
}

.chart-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(60, 70, 120, 0.35);
  border: 1px solid rgba(120, 130, 190, 0.35);
  border-radius: 14px;
  padding: 2px 4px 2px 10px;
  font-size: 0.72rem;
  color: #dcdcf0;
}
[data-theme="light"] .chart-chip {
  background: rgba(220, 225, 240, 0.85);
  border-color: rgba(120, 130, 180, 0.35);
  color: #2b2b46;
}
.chart-chip-label {
  white-space: nowrap;
}
.chart-chip-color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35) inset;
  flex-shrink: 0;
}
.chart-chip-cog,
.chart-chip-remove {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0 4px;
  font-size: 0.85rem;
  line-height: 1;
  border-radius: 50%;
}
.chart-chip-cog:hover {
  background: rgba(255, 255, 255, 0.12);
}
.chart-chip-remove:hover {
  background: rgba(239, 83, 80, 0.35);
  color: #fff;
}

/* Modal overlay + panel */

#chartIndMenu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 10050;
  padding-top: 8vh;
}

.chart-ind-menu-panel {
  width: min(92vw, 780px);
  max-height: 78vh;
  background: #10112a;
  border: 1px solid #1e1e35;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
[data-theme="light"] .chart-ind-menu-panel {
  background: #ffffff;
  border-color: #d3d8e6;
  box-shadow: 0 12px 36px rgba(60, 70, 120, 0.18);
}

.chart-ind-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(120, 130, 180, 0.2);
}
.chart-ind-menu-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #dcdcf0;
  flex-shrink: 0;
}
[data-theme="light"] .chart-ind-menu-title { color: #2b2b46; }

#chartIndMenuSearch {
  flex: 1 1 auto;
  background: rgba(120, 130, 180, 0.1);
  border: 1px solid rgba(120, 130, 180, 0.3);
  color: #dcdcf0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
}
[data-theme="light"] #chartIndMenuSearch {
  background: #f3f5fb;
  color: #2b2b46;
  border-color: #d3d8e6;
}

.chart-ind-menu-close {
  background: transparent;
  border: none;
  color: #dcdcf0;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 6px;
}
.chart-ind-menu-close:hover {
  background: rgba(239, 83, 80, 0.3);
  color: #fff;
}

.chart-ind-menu-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  padding: 12px;
  overflow-y: auto;
}

.chart-ind-menu-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chart-ind-menu-cat {
  font-size: 0.72rem;
  font-weight: 700;
  color: #6d7aa6;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 4px 6px;
  border-bottom: 1px solid rgba(120, 130, 180, 0.15);
  margin-bottom: 4px;
}

.chart-ind-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(45, 55, 95, 0.22);
  border: 1px solid rgba(120, 130, 180, 0.18);
  color: #dcdcf0;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
}
.chart-ind-menu-item:hover {
  background: rgba(61, 90, 254, 0.25);
  border-color: rgba(61, 90, 254, 0.55);
}
.chart-ind-menu-item.active {
  background: rgba(38, 166, 154, 0.25);
  border-color: rgba(38, 166, 154, 0.6);
  color: #aff0dc;
}
[data-theme="light"] .chart-ind-menu-item {
  background: #f3f5fb;
  color: #2b2b46;
  border-color: #d3d8e6;
}
[data-theme="light"] .chart-ind-menu-item.active {
  background: #d5f4ec;
  color: #176b57;
  border-color: #8fd4bf;
}
.chart-ind-menu-hint {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-left: 6px;
}

.chart-ind-menu-empty {
  padding: 18px;
  text-align: center;
  color: #6d7aa6;
  font-size: 0.85rem;
}

/* Params editor */

#chartIndParamsModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10060;
}

.chart-ind-params-panel {
  width: min(92vw, 360px);
  background: #10112a;
  border: 1px solid #1e1e35;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
[data-theme="light"] .chart-ind-params-panel {
  background: #ffffff;
  border-color: #d3d8e6;
}

.chart-ind-params-head {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(120, 130, 180, 0.2);
  font-size: 0.9rem;
  font-weight: 600;
  color: #dcdcf0;
}
[data-theme="light"] .chart-ind-params-head { color: #2b2b46; }

.chart-ind-params-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chart-ind-params-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chart-ind-params-row label {
  flex: 0 0 100px;
  font-size: 0.8rem;
  color: #c4c4df;
}
[data-theme="light"] .chart-ind-params-row label { color: #3a3a54; }
.chart-ind-params-row input {
  flex: 1 1 auto;
  background: rgba(120, 130, 180, 0.1);
  border: 1px solid rgba(120, 130, 180, 0.3);
  color: #dcdcf0;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
}
[data-theme="light"] .chart-ind-params-row input {
  background: #f3f5fb;
  color: #2b2b46;
  border-color: #d3d8e6;
}

.chart-ind-params-foot {
  padding: 10px 12px;
  border-top: 1px solid rgba(120, 130, 180, 0.2);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.chart-ind-params-foot button {
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  cursor: pointer;
  border: 1px solid rgba(120, 130, 180, 0.3);
  background: rgba(60, 70, 120, 0.3);
  color: #dcdcf0;
}
.chart-ind-params-foot button.primary {
  background: linear-gradient(135deg, #2d2dab, #3d5afe);
  border-color: transparent;
}
.chart-ind-params-foot button:hover {
  filter: brightness(1.15);
}
