#watchWidget {
  --watch-grip-width: 28px;
  container-type: inline-size;
}
.watch-actions {
  display: flex;
  flex: none;
  gap: 5px;
}
.watch-actions .iconbtn {
  width: 25px;
  min-width: 25px;
  height: 25px;
  min-height: 25px;
  border: 1px solid #ffffff13;
  border-radius: 6px;
}
.watch-actions .iconbtn svg {
  width: 14px;
  height: 14px;
}
#watchWidget.shows-news .watch-actions {
  display: none;
}
#watchSelectRows {
  display: none;
}
#watchWidget .paneltitle .watch-tab-icon {
  display: none;
}
.watch-bulk-actions:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px 3px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
#watchWidget.shows-news .watch-bulk-actions {
  display: none;
}
.watch-bulk-actions > span {
  margin-inline-end: auto;
}
.watch-bulk-actions .iconbtn {
  min-width: 27px;
  min-height: 27px;
}
.watch-bulk-actions .iconbtn:disabled {
  opacity: .45;
}
.watch-select-row {
  flex: none;
  align-self: center;
  margin-inline: calc((var(--watch-grip-width) - 14px) / 2);
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}
.watchrow:has(.watch-select-row:checked) {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}
.chart-menu.watch-pair-menu { width: max-content; }
.watch-pair-menu .submenu-left .chart-menu-arrow { transform: rotate(180deg); }
@media (pointer: coarse) {
  .watch-pair-menu .chart-menu-item { min-height: 44px; }
}
.chart-menu:is(.chart-submenu, .watch-move-menu) {
  width: min(250px, calc(100vw - 12px));
  max-height: min(320px, calc(100dvh - 12px));
  box-sizing: border-box;
}
.chart-menu:is(.chart-submenu, .watch-move-menu) .chart-menu-item > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chart-menu:is(.chart-submenu, .watch-move-menu) .menu-caption {
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
#watchWidget .watchhead {
  padding-inline-end: calc(var(--watch-grip-width) + 6px);
}
#watchRows .watchgroup {
  display: flex;
  align-items: center;
  padding: 0 5px 0 0;
}
.watch-collapse {
  flex: 1;
  justify-content: flex-start;
  min-width: 0;
  min-height: 28px;
  padding: 4px 6px 4px 15px;
  border-radius: 0;
  font: inherit;
  letter-spacing: inherit;
}
.watch-chevron {
  width: 6px;
  height: 6px;
  flex: none;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}
.watch-collapse[aria-expanded='false'] .watch-chevron {
  transform: rotate(-45deg);
}
.watch-category-name,
.watch-identity :is(b, small) {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.watch-count {
  flex: none;
  color: var(--muted);
  margin-inline-start: auto;
  font: 10px/1.25 var(--mono);
}
.watch-category-options,
.watch-grip {
  flex: none;
  padding: 0;
  color: var(--muted);
}
.watch-category-options {
  width: 22px;
  min-height: 24px;
}
.watch-grip {
  width: var(--watch-grip-width);
  min-height: 32px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.watch-grip:active {
  cursor: grabbing;
}
:is(.watch-grip, .watch-category-options) svg {
  width: 14px;
  height: 14px;
}
#watchRows .watch-instrument {
  gap: 5px;
  padding-inline-end: 6px;
}
.watch-identity {
  min-width: 0;
}
.watchprice {
  flex: none;
}
.watchprice > span {
  border-radius: 3px;
  padding-inline: 3px;
  margin-inline: -3px;
}
#watchRows :is(.watch-collapse, .watch-grip, .watch-instrument):focus-visible {
  outline-offset: -2px;
}
#watchRows .watch-dragging {
  opacity: .55;
  user-select: none;
}
#watchRows .watch-drop-before {
  box-shadow: inset 0 2px var(--accent);
}
#watchRows .watch-drop-after {
  box-shadow: inset 0 -2px var(--accent);
}
#watchRows .watch-drop-category {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.watch-edit {
  display: grid;
  gap: 10px;
}
#dialogBody .market-picker > .watch-add-destination {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 7px 16px;
  border-bottom: 1px solid var(--line);
}
.watch-add-destination select {
  max-width: 60%;
}
@container (max-width: 215px) {
  #watchWidget .panelhead {
    gap: 4px;
    padding-inline: 7px;
  }
  #watchWidget .panelhead .paneltitle {
    gap: 3px;
  }
  #watchWidget .panelhead .paneltitle button {
    padding-inline: 2px;
  }
  #watchWidget .panelhead .paneltitle > i {
    display: none;
  }
}
@media (pointer: coarse) {
  #watchWidget {
    --watch-grip-width: 36px;
  }
  .watch-collapse {
    min-height: 34px;
  }
  .watch-category-options {
    width: 32px;
    min-height: 32px;
  }
}

#toggleWatchPanel,
.watch-width-grip {
  display: none;
}

@media (min-width: 761px) {
  #watchSelectRows {
    display: inline-flex;
  }
  #watchSelectRows[aria-pressed='true'] {
    color: var(--accent);
    border-color: var(--accent);
  }
  #watchWidget {
    position: relative;
  }
  .watch-width-grip:not([hidden]) {
    position: absolute;
    inset: 38px auto 0 0;
    display: grid;
    justify-items: center;
    align-items: center;
    width: 9px;
    z-index: 3;
    cursor: col-resize;
    touch-action: none;
  }
  .watch-width-grip.watch-edge-right {
    inset-inline: auto 0;
  }
  .watch-width-grip::after {
    content: '';
    width: 3px;
    height: 26px;
    border-radius: 2px;
    background: var(--muted);
    opacity: .46;
  }
  .watch-width-grip:is(:hover, :focus-visible)::after,
  .watch-width-dragging .watch-width-grip::after {
    opacity: 1;
    background: var(--accent);
  }
  .watch-width-dragging,
  .watch-width-dragging * {
    cursor: col-resize !important;
    user-select: none;
  }
}
@container (max-width: 170px) {
  #watchWidget .panelhead {
    gap: 3px;
    padding-inline: 4px;
  }
  #watchWidget .watch-actions {
    gap: 3px;
  }
  #watchWidget .watch-actions .iconbtn {
    width: 21px;
    min-width: 21px;
  }
  #watchWidget .paneltitle button {
    width: 24px;
  }
  #watchWidget .paneltitle .watch-tab-icon {
    display: inline-flex;
    width: 15px;
    height: 15px;
  }
  #watchWidget .paneltitle button > span {
    display: none;
  }
  #watchRows .watch-identity small {
    display: none;
  }
}
