/* Line or Candles (chart-type.js): an icon switch in the chart's toolbar, before Draw. Same surface as the toolbar's other
   switches (near-black, a hairline ring), the chosen type lit white; on a phone one candle button the size of Draw's. */
.chfoot .lwtype { order: 1; flex: none; display: inline-flex; gap: 2px; margin-left: auto; padding: 2px; border-radius: 999px; background: #0c0c0e; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.10); }
.chfoot .dwbtn { order: 2; }
.chfoot .lwattr { order: 3; }
.chfoot:has(.lwtype) .dwbtn { margin-left: 8px; }
.lwtype button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: #8a8d95; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lwtype button svg { width: 16px; height: 16px; }
@media (hover: hover) { .lwtype button:hover { color: #fff; } }
.lwtype button.on { background: #1c1c20; color: #fff; }
.lwtype button:focus { outline: none; }
.lwtype button:focus-visible { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5); }
body.dw-on .chfoot .lwtype { display: none; } /* Draw a trade has the chart */
@media (max-width: 599px) {
  /* one button: candles on or off (a 44px tap area around the 36px circle); and Draw keeps only its pencil here as it
     does under 480px (draw-trade.css), so the row never pushes the page sideways */
  .chfoot .lwtype { padding: 0; background: transparent; box-shadow: none; }
  .lwtype button[data-t="line"] { display: none; }
  .lwtype button[data-t="candles"] { position: relative; width: 36px; height: 36px; background: #0c0c0e; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
  .lwtype button[data-t="candles"]::after { content: ""; position: absolute; inset: -4px; }
  .lwtype button[data-t="candles"].on { background: #1c1c20; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); color: #fff; }
  .chfoot:has(.lwtype) .dwbtn { margin-left: 6px; margin-right: 0; flex: none; width: 36px; height: 36px; padding: 0; justify-content: center; }
  /* a touch screen: the same 44px round button as Draw beside it */
  @media (pointer: coarse) { .lwtype button[data-t="candles"] { width: 44px; height: 44px; } .lwtype button[data-t="candles"]::after { inset: 0; } .chfoot:has(.lwtype) .dwbtn { width: 44px; height: 44px; } }
  .chfoot:has(.lwtype) .dwbtn span { display: none; } /* named by aria-label="Draw" */
}
/* a small phone (320–374): the range words set a touch tighter so the two round buttons never touch MONTH */
@media (max-width: 374px) {
  html.rh .chfoot:has(.lwtype) { gap: 4px; }
  html.rh .chfoot:has(.lwtype) .rng button, html.rh.tk-simple .chfoot:has(.lwtype) .rng button { flex: 0 0 auto; padding: 0 2px; font-size: 11px; letter-spacing: 0; }
  html.rh .chfoot:has(.lwtype) .rng button[data-r="0"]::before { margin-right: 4px; }
  html.rh .chfoot:has(.lwtype) .rng button.on::after { left: 2px; right: 2px; }
  html.rh .chfoot:has(.lwtype) .rng button.on:first-child::after { left: 0; }
  .chfoot:has(.lwtype) .dwbtn { margin-left: 4px; }
}
/* a touch screen wider than a phone (iPad, a phone held sideways): both switches 44px, as Draw beside them (r16: 32x28) */
@media (pointer: coarse) and (min-width: 600px) {
  .lwtype button { width: 44px; height: 44px; }
  .chfoot:has(.lwtype) .dwbtn { min-height: 44px; }
}
