/* Shared menu theme, based on the movements detector. */
.exchangeLiveLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.exchangeLiveLinks a {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border: 1px solid #494736;
  border-radius: 6px;
  color: var(--gold);
  background: #242219;
  white-space: nowrap;
}
.exchangeLiveLinks a:hover {
  background: #343024;
}
main > header .exchangeConfigure {
  flex: none;
  padding: 6px;
}
main > header .exchangeConfigure svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
}
dialog:is(
  #helperDiagramDialog,
  #settings,
  #movementAlerts,
  #emaDistanceDialog,
  #liquidationEntryDialog,
  #fibonacciSettings,
  #pairPicker,
  #sessionHistory,
  #positionHistory,
  #binanceConnect,
  #customTimeframe,
  #confirm
) {
  background: #111;
  color: #ddd;
  border: 1px solid #303030;
  border-radius: 9px;
  padding: 17px;
  max-width: calc(100vw - 24px);
  max-height: 85dvh;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #424242 transparent;
  box-shadow: 0 16px 55px #0009;
  font:
    11px/1.5 Inter,
    system-ui,
    sans-serif;
}
dialog::backdrop {
  background: #0009;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
body dialog .dialogHead {
  position: sticky;
  top: -17px;
  z-index: 5;
  background: #111;
  margin: -17px -17px 12px;
  padding: 15px 17px 10px;
  border-bottom: 1px solid #242424;
  min-height: 45px;
  align-items: center;
}
body dialog .dialogHead h2,
body dialog > h2 {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
  color: #e3e3e3;
  letter-spacing: -0.15px;
  margin: 0;
}
body dialog .dialogHead small {
  display: block;
  font-size: 9px;
  color: #888;
  margin-top: 3px;
}
body dialog button,
body dialog .backupActions a {
  background: #1b1b1b;
  border: 1px solid #333;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 10px;
  line-height: 1.35;
  font-weight: 500;
  color: #c3c3c3;
  min-height: 27px;
  box-shadow: none;
}
body dialog button:hover {
  background: #242424;
  border-color: #4c4c4c;
  color: #eee;
}
body dialog button:focus-visible,
body dialog input:focus-visible,
body dialog select:focus-visible {
  outline: 1px solid #baa069;
  outline-offset: 2px;
}
body dialog .dialogHead > button {
  display: grid;
  place-items: center;
  min-height: 25px;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #888;
  font-size: 19px;
  border-radius: 4px;
}
body dialog .dialogHead > button:hover {
  background: #ffffff08;
  color: #eee;
}
body dialog :is(.primary, button[type='submit']) {
  background: #242219;
  border-color: #4b4432;
  color: #d8c79a;
}
body dialog :is(.sell, [data-clear-all], [data-delete], [data-fib-action='clear']) {
  color: #f17487;
  background: #22181b;
  border-color: #493037;
}
body dialog label {
  font-size: 10px;
  color: #a0a0a0;
  line-height: 1.4;
  margin-bottom: 8px;
  min-width: 0;
}
body dialog input:not([type='checkbox']):not([type='range']):not([type='color']),
body dialog select {
  background: #0c0c0c;
  border: 1px solid #303030;
  border-radius: 5px;
  height: 29px;
  padding: 4px 7px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 11px;
  color: #ddd;
  width: 100%;
  margin-top: 4px;
  min-width: 0;
  box-shadow: none;
}
body dialog .compactControl > input,
body dialog .compactControl > select {
  font-size: 16px;
  width: 145.454545%;
  height: 40px;
  padding: 6px 8px;
  margin: 0;
}
body dialog input[type='checkbox'] {
  width: 14px;
  height: 14px;
  accent-color: #baa069;
  cursor: pointer;
  flex: none;
}
body dialog input[type='range'] {
  accent-color: #baa069;
  width: 100%;
}
body dialog input[type='color'] {
  background: #151515;
  border: 1px solid #333;
  border-radius: 5px;
  width: 32px;
  height: 29px;
  padding: 3px;
  cursor: pointer;
}
body dialog :is(.note, .modelNotes) {
  font-size: 9px !important;
  line-height: 1.5;
  color: #888;
  margin: 8px 0;
}
body dialog :is(fieldset) {
  border: 1px solid #2e2e2e;
  border-radius: 6px;
  background: #131313;
  padding: 10px;
  margin: 9px 0;
  min-width: 0;
}
body dialog legend {
  font-size: 10px;
  color: #bbb;
  padding: 0 5px;
  font-weight: 550;
}
body dialog .tabs {
  gap: 4px;
  min-height: 34px;
  padding: 0 0 8px;
  margin: 0 0 13px;
  border-bottom: 1px solid #292929;
  scrollbar-width: thin;
}
body dialog .tabs button {
  border-color: transparent;
  background: transparent;
  color: #8c8c8c;
  white-space: nowrap;
  flex: none;
}
body dialog .tabs button.selected,
body dialog #pairFilters button.selected,
body dialog button[aria-expanded='true'] {
  background: #252217;
  border-color: #4c4430;
  color: #dcc895;
}
body dialog :is(.checkLabel) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px;
  background: #161616;
  border: 1px solid #292929;
  border-radius: 5px;
  min-height: 32px;
  margin: 0;
}
body dialog :is(#chartConfig, .fibOptions, .fibCoordinates) {
  gap: 10px 12px;
}
body dialog #configFields {
  gap: 0 12px;
}
body dialog #configFields h3 {
  font-size: 10px;
  color: #bbb;
  border-bottom: 1px solid #292929;
  padding-bottom: 6px;
  margin: 12px 0 8px;
}
body dialog #chartConfig > fieldset {
  grid-column: 1/-1;
  margin: 0;
}
.emaSettings p {
  font-size: 9px;
  color: #888;
}
body dialog .emaSettingsRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  gap: 10px;
  align-items: end;
  margin-top: 6px;
}
body dialog .fibSettingsBody {
  max-height: none;
  overflow: visible;
  padding: 0;
}
.fibOptions label:has(input[type='checkbox']) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #161616;
  border: 1px solid #292929;
  border-radius: 5px;
  padding: 6px 8px;
  margin: 0;
}
body dialog .fibLevel {
  padding: 5px 6px;
  border: 1px solid #2a2a2a;
  border-radius: 5px;
  background: #151515;
  gap: 6px;
}
.fibLevel input {
  margin: 0 !important;
}
.fibLevel button {
  padding: 0;
  width: 25px;
  min-height: 25px;
}
.fibActions {
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
body dialog .accountGrid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.accountGrid .metric {
  background: #161616;
  border: 1px solid #2b2b2b;
  border-radius: 5px;
  padding: 9px;
}
.accountGrid .metric span {
  font-size: 9px;
}
.accountGrid .metric strong {
  font-size: 12px;
}
body dialog :is(.historyItem, .sessionRow, .emaDistanceResult) {
  background: #161616;
  border: 1px solid #303030;
  border-radius: 6px;
  padding: 10px;
  margin: 7px 0;
  box-shadow: none;
}
body dialog .historyItem header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  height: auto;
  min-height: 0;
  border: 0;
}
.historyItem header strong {
  font-size: 10px;
}
.historyItem header time {
  font-size: 8px;
}
.historyValues {
  gap: 7px 10px;
}
.historyValues .metric {
  min-width: 0;
}
.historyValues .metric span {
  font-size: 8px;
}
.historyValues .metric strong {
  font-size: 10px;
}
body dialog .sessionRow {
  width: 100%;
  font-size: 10px;
  text-align: left;
}
.sessionRow time {
  font-size: 8px;
  color: #888;
}
.sessionRow > strong {
  font-size: 12px;
}
body dialog .historyBottom {
  position: sticky;
  bottom: -17px;
  background: #111;
  padding: 10px 0 4px;
  border-top: 1px solid #292929;
  gap: 6px;
}
body dialog :is(.emaDistanceResult header, .emaDistanceResult > div) {
  height: auto;
  min-height: 0;
  border: 0;
}
.emaDistanceResult .emaDuration {
  font-size: 12px;
}
body dialog :is(.movementAlertConfig, .emaDistanceConfig) {
  gap: 8px 12px;
}
.movementAlertControls {
  gap: 6px;
}
body dialog .alertFilters {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}
.alertFilters input {
  grid-column: 1/-1;
}
.alertFilters input,
.alertFilters select {
  margin-top: 0 !important;
}
body dialog .pairColumns {
  padding: 7px 0;
  font-size: 8px;
}
.pairRow {
  min-height: 38px;
}
.pairRow:hover {
  background: #1a1a1a;
}
body dialog #pairRows {
  max-height: 48dvh;
  scrollbar-color: #444 transparent;
}
.backupActions a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
body dialog #confirmText {
  font-size: 11px;
  line-height: 1.6;
  margin: 12px 0;
  color: #aaa;
}
@media (max-width: 600px) {
  dialog:is(
    #helperDiagramDialog,
    #settings,
    #movementAlerts,
    #emaDistanceDialog,
    #liquidationEntryDialog,
    #fibonacciSettings,
    #pairPicker,
    #sessionHistory,
    #positionHistory,
    #binanceConnect,
    #customTimeframe,
    #confirm
  ) {
    padding: 12px;
    width: calc(100vw - 24px);
    max-height: 88dvh;
  }
  body dialog .dialogHead {
    top: -12px;
    margin: -12px -12px 10px;
    padding: 12px;
  }
  body dialog input:not([type='checkbox']):not([type='range']):not([type='color']),
  body dialog select {
    font-size: 16px;
    min-height: 32px;
  }
  body dialog .compactControl > input,
  body dialog .compactControl > select {
    height: 40px;
  }
  body dialog :is(#chartConfig, .fibCoordinates) {
    grid-template-columns: 1fr;
  }
  .emaDistanceConfig {
    align-items: stretch;
  }
  .emaDistanceConfig label {
    flex: 1 1 130px;
  }
  .emaDistanceConfig input {
    width: 100% !important;
  }
  body dialog .historyBottom {
    bottom: -12px;
  }
  body dialog .historyValues {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
