﻿/* static/css/panneau_bandes_bollinger.css */

#bollingerPanel,
#bollingerBody,
.bbCard,
.bbRow {
  font-family: inherit;
}

#bollingerBody,
#bollingerBody * {
  font-size: 12px;
  line-height: 1.2;
  box-sizing: border-box;
}

#bollingerBody {
  color: var(--ia-panels-body-fg) !important;
  background: var(--ia-panels-body-bg) !important;
  padding: 10px !important;
  padding-right: 14px !important;
  padding-bottom: 80px !important;
  overflow-y: auto !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
}

.bbCard {
  border: 1px solid var(--ia-panels-body-border-soft);
  border-radius: 10px;
  padding: 12px;
  background: var(--ia-panels-body-bg);
  box-shadow: none;
  position: relative;
}

.bbHeaderRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.bbTopActions{
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.bbHeaderTitle,
.bbSectionTitle {
  font-size: 13px;
  font-weight: 800;
  color: var(--ia-panels-body-fg);
}

.bbSectionTitle {
  margin-top: 12px;
  margin-bottom: 12px;
}

.bbRow {
  padding: 0 2px 8px 2px;
  margin: 0;
  border-bottom: 1px solid var(--ia-panels-body-border-soft);
}

.bbRow + .bbRow {
  padding-top: 10px;
}

.bbRow.bbRowNoDivider {
  border-bottom: 0;
  padding-bottom: 6px;
}

.bbRow:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.bbRowHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.bbRowTitle {
  font-weight: 800;
  font-size: 12px;
  color: var(--ia-panels-body-fg);
}

.bbFillRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ia-panels-body-border-soft);
}

.bbFillRow.bbFillRowNoDivider {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.bbFillLabel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ia-panels-body-fg);
  cursor: pointer;
}

.bbFillCheck {
  width: 14px;
  height: 14px;
  margin: 0;
}

.bbFillColor {
  width: 42px;
  height: 18px;
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 0;
  padding: 0;
  background: var(--ia-panels-body-bg);
  cursor: pointer;
}

.bbFillColor::-webkit-color-swatch-wrapper { padding: 0; }
.bbFillColor::-webkit-color-swatch { border: 0; }

.bbResetRow{
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* Reset + chainette en haut à droite (hors bloc principal) */
#bollingerPanel .bbTopActions .iaBtnReset,
#bollingerPanel .bbTopActions .iaBtnChainette{
  width: 22px;
  height: 22px;
  border-radius: 6px;
}
#bollingerPanel .bbTopActions .iaBtnReset svg,
#bollingerPanel .bbTopActions .iaBtnChainette svg{
  width: 14px;
  height: 14px;
}

/* Chainette "réglages indicateur" = même gabarit que reset (22x22) */
#bollingerPanel .bbResetRow .iaBtnChainette{
  width: 22px;
  height: 22px;
  border-radius: 6px;
}
#bollingerPanel .bbResetRow .iaBtnChainette svg{
  width: 14px;
  height: 14px;
}

.bbStddevSelect {
  width: 100%;
  height: 100%;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  background: transparent !important;
  text-align: left;
  text-align-last: left;
  padding: 0 6px;
  font-weight: 500;
  font-size: 12px;
  color: var(--ia-panels-body-fg) !important;
  -webkit-text-fill-color: var(--ia-panels-body-fg) !important;
  font-variant-numeric: tabular-nums;
}

/* Ecart-type Bollinger: un peu plus large que la période SMA pour éviter la coupe (ex: 1.5) */
#bollingerBody .bbRow .smaBoxPeriod{
  width: 46px;
  flex: 0 0 46px;
  min-width: 46px;
}

/* Sélecteur numérique réutilisable (période/écart-type) */
#bollingerPanel .iaNumStepper{
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 12px;
  align-items: stretch;
}
#bollingerPanel .iaNumStepper .smaPeriodInput{
  padding-right: 2px;
}
#bollingerPanel .iaNumArrows{
  border-left: 1px solid rgba(0,0,0,0.20);
  display: grid;
  grid-template-rows: 1fr 1fr;
}
#bollingerPanel .iaNumBtn{
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--ia-panels-body-fg);
  cursor: pointer;
  font-size: 8px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
#bollingerPanel .iaNumBtn:hover{
  background: rgba(0,0,0,0.08);
}

/* Masque les spinners natifs pour garder un seul style cohérent */
#bollingerPanel .smaPeriodInput::-webkit-outer-spin-button,
#bollingerPanel .smaPeriodInput::-webkit-inner-spin-button{
  -webkit-appearance: none;
  margin: 0;
}

#bollingerPanel .smaFrame {
  border: 1px solid var(--ia-panels-body-border-soft);
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
  background: var(--ia-panels-body-bg);
}

#bollingerPanel .smaFrameTitle {
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 12px;
}

#bollingerPanel .smaOptRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#bollingerPanel .smaOptLabel {
  font-weight: 700;
  font-size: 13px;
}

#bollingerPanel .smaOptLine {
  border-top: 1px solid var(--ia-panels-body-border-soft);
  margin: 10px 0;
}

#bollingerPanel .bbCurveGrid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

#bollingerPanel .bbCurveLine {
  display: grid;
  align-items: center;
  column-gap: 6px;
}

#bollingerPanel .bbCurveLine--first {
  grid-template-columns: 70px 46px;
}

#bollingerPanel .bbCurveLine--color {
  grid-template-columns: 70px 42px;
}

#bollingerPanel .bbCurveLine--trait {
  grid-template-columns: 70px 80px 80px;
}

#bollingerPanel .bbCurveLine--fill {
  grid-template-columns: max-content 42px;
  column-gap: 8px;
}

#bollingerPanel .bbLineLabel {
  font-weight: 400;
  font-size: 12px;
  color: var(--ia-panels-body-fg);
  white-space: nowrap;
}

#bollingerPanel .bbFillInlineLabel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  color: var(--ia-panels-body-fg);
  cursor: pointer;
  white-space: nowrap;
}

#bollingerPanel .bbFillColorInline {
  width: 42px;
  min-width: 42px;
}
