/* static/css/panneau_volume.css */

#volumePanel,
#volumeBody,
.volCard,
.volRow {
  font-family: inherit;
}

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

#volumeBody {
  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;
}

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

.volCard {
  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;
}

.volRow {
  padding: 8px 2px 10px 2px;
  margin: 0;
  border-bottom: 0;
}

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

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

#volumePanel .volTopActions .iaBtnReset,
#volumePanel .volTopActions .iaBtnChainette {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}
#volumePanel .volTopActions .iaBtnReset svg,
#volumePanel .volTopActions .iaBtnChainette svg {
  width: 14px;
  height: 14px;
}

#volumePanel .smaControls {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}

#volumePanel .smaBox {
  height: 18px;
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: auto;
}

#volumePanel .smaBoxColor {
  width: 42px;
  flex: 0 0 42px;
  min-width: 42px;
}

#volumePanel .smaBoxPeriod {
  width: 46px;
  flex: 0 0 46px;
  min-width: 46px;
}

#volumePanel .smaBoxWidth {
  width: 80px;
  flex: 0 0 80px;
  min-width: 80px;
  justify-content: space-between;
  padding: 0 4px;
  gap: 6px;
}

#volumePanel .smaBoxStyle {
  width: 80px;
  flex: 0 0 80px;
  min-width: 80px;
  justify-content: center;
  padding: 0;
  gap: 0;
}

#volumePanel .smaColorInput {
  width: 100%;
  height: 100%;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  cursor: pointer;
}
#volumePanel .smaColorInput::-webkit-color-swatch-wrapper { padding: 0; }
#volumePanel .smaColorInput::-webkit-color-swatch { border: 0; }

#volumePanel .smaPeriodInput {
  width: 100%;
  height: 100%;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  text-align: center;
  font-weight: 500;
  font-size: 12px;
  padding: 0 4px;
  color: var(--ia-panels-body-fg) !important;
}

#volumePanel .iaNumStepper {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 12px;
  align-items: stretch;
}
#volumePanel .iaNumStepper .smaPeriodInput {
  padding-right: 2px;
}
#volumePanel .iaNumArrows {
  border-left: 1px solid rgba(0,0,0,0.20);
  display: grid;
  grid-template-rows: 1fr 1fr;
}
#volumePanel .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;
}
#volumePanel .iaNumBtn:hover {
  background: rgba(0,0,0,0.08);
}

#volumePanel .smaPeriodInput::-webkit-outer-spin-button,
#volumePanel .smaPeriodInput::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

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

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

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

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

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

#volumePanel .volOptGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

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

#volumePanel .volLabelColorTitle {
  font-weight: 700;
  font-size: 12px;
  min-width: 68px;
  color: var(--ia-panels-body-fg);
}

#volumePanel .volLabelColorInputs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  justify-content: flex-start;
}

#volumePanel .volLabelColorBox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ia-panels-body-fg);
  position: relative;
}

#volumePanel .volLabelColorBox input[type="color"] {
  width: 34px;
  height: 18px;
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 0;
  padding: 0;
}
#volumePanel .volLabelColorBox .smaColorInput {
  width: 34px !important;
  height: 18px !important;
  border: 1px solid rgba(0,0,0,0.25) !important;
  background: var(--ia-panels-body-bg) !important;
  padding: 0 !important;
  cursor: pointer !important;
}
#volumePanel .volLabelColorBox .smaColorInput::-webkit-color-swatch-wrapper { padding: 0; }
#volumePanel .volLabelColorBox .smaColorInput::-webkit-color-swatch { border: 0; }

#volumePanel .volAaPicker {
  width: 34px;
  height: 18px;
  border: 1px solid rgba(0,0,0,0.25);
  background: #fff;
  border-radius: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  user-select: none;
  position: relative;
  cursor: pointer;
}

#volumePanel .volAaPickerInput {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
}

#volumePanel .volLabelStyleRow {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}

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

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

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

#volumePanel .volCurveLine--colors {
  grid-template-columns: max-content 42px 8px max-content 42px 22px;
  column-gap: 4px;
  padding-left: 5px;
}

#volumePanel .volPairSpacer {
  width: 10px;
  height: 1px;
}

#volumePanel .volCurveLine--stroke {
  grid-template-columns: 58px 80px 80px;
}

#volumePanel .volCurveLine--ma-type {
  grid-template-columns: 58px 130px;
}

#volumePanel .volCurveLine--ma-period {
  grid-template-columns: 58px 46px;
}

#volumePanel .volCurveLine--ma-colors {
  grid-template-columns: max-content 42px 8px max-content 42px 22px;
  column-gap: 4px;
}

#volumePanel .volCurveLine--ma-stroke {
  grid-template-columns: 58px 80px 80px;
}

#volumePanel .volSectionSwitchSlot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#volumePanel .volControlsHidden {
  display: none !important;
}

#volumePanel .volMaTypeBox {
  width: 130px;
  flex: 0 0 130px;
  min-width: 130px;
  justify-content: flex-start;
  padding: 0;
}

#volumePanel .volMaTypeSelect {
  width: 100%;
  height: 100%;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  color: var(--ia-panels-body-fg) !important;
  font-size: 12px;
  font-weight: 500;
  padding: 0 6px;
}

#volumePanel .volMiniChainBtn {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  border-radius: 4px !important;
  padding: 0 !important;
  --ia-btnlink-bg: var(--ia-panels-btn-bg, #fff);
  --ia-btnlink-fg: var(--ia-panels-btn-fg, #111);
  --ia-btnlink-hover-bg: var(--ia-panels-btn-hover-bg, #f3f3f3);
  --ia-btnlink-hover-fg: var(--ia-panels-btn-hover-fg, var(--ia-panels-btn-fg, #111));
  --ia-btnlink-active-bg: var(--ia-panels-btn-active-bg, #e6e6e6);
  --ia-btnlink-active-fg: var(--ia-panels-btn-active-fg, var(--ia-panels-btn-fg, #111));
}

#volumePanel .volMiniChainBtn svg {
  width: 11px !important;
  height: 11px !important;
}

#volumePanel .volMiniChainBtn.isActive {
  border-color: var(--ia-panels-btn-active-fg, var(--ia-panels-btn-fg, #111)) !important;
}
