.subtitle-removal-trigger {
  display: inline-grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(3, 8, 15, 0.82);
  color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.subtitle-removal-trigger:hover,
.subtitle-removal-trigger:focus-visible {
  border-color: rgba(112, 222, 206, 0.7);
  background: rgba(14, 38, 42, 0.95);
  color: #88f5e2;
  outline: none;
  transform: translateY(-1px);
}

.subtitle-removal-trigger svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.video-result-primary-action {
  position: absolute;
  z-index: 8;
  top: -42px;
  left: 0;
  pointer-events: auto;
}

.result-stage.has-video-primary-action {
  position: relative;
}

.context-menu .subtitle-removal-context-entry {
  display: none;
}

.context-menu.connection-create .subtitle-removal-context-entry:not([hidden]) {
  display: grid;
}

.subtitle-removal-drawer {
  gap: 6px;
  padding: 8px 10px;
}

.node-card.subtitle-removal-node.visual-expanded {
  width: min(500px, calc(100vw - 76px));
}

.subtitle-removal-drawer-status {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 0 2px;
  margin: 0;
}

.subtitle-removal-status-dot {
  width: 7px;
  height: 7px;
  margin-top: 0;
  border-radius: 50%;
  background: rgba(169, 197, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(169, 197, 255, 0.08);
}

.subtitle-removal-drawer-status.is-running .subtitle-removal-status-dot {
  background: #53bfff;
  box-shadow: 0 0 0 4px rgba(83, 191, 255, 0.11), 0 0 15px rgba(83, 191, 255, 0.42);
}

.subtitle-removal-drawer-status.is-error .subtitle-removal-status-dot {
  background: #e9938a;
  box-shadow: 0 0 0 4px rgba(233, 147, 138, 0.1);
}

.subtitle-removal-drawer-status > div {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 6px;
}

.subtitle-removal-drawer-status b {
  color: rgba(243, 239, 230, 0.94);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.subtitle-removal-drawer-status small {
  color: rgba(192, 214, 244, 0.68);
  font-size: 10px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subtitle-removal-node .visual-result-kind {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.subtitle-removal-node .visual-node-drag-handle {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 5px;
  border: 1px solid rgba(83, 191, 255, 0.28);
  border-radius: 5px;
  background: rgba(83, 191, 255, 0.1);
  color: #a9ddff;
  font-size: 8px;
  font-style: normal;
  line-height: 1;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.subtitle-removal-node .visual-node-drag-handle:active {
  cursor: grabbing;
}

.subtitle-removal-region-target {
  position: relative;
}

.subtitle-removal-region-layer {
  position: absolute;
  z-index: 4;
  inset: 0;
  cursor: crosshair;
  touch-action: none;
}

.subtitle-removal-region-overlay-tools {
  position: absolute;
  z-index: 6;
  top: 8px;
  right: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 7px 6px 9px;
  border-radius: 8px;
  background: rgba(3, 10, 20, 0.86);
  color: rgba(237, 246, 255, 0.9);
  font-size: 9px;
  font-weight: 800;
  pointer-events: none;
}

.subtitle-removal-region-overlay-tools button {
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(169, 197, 255, 0.34);
  border-radius: 6px;
  background: rgba(22, 35, 63, 0.88);
  color: rgba(243, 239, 230, 0.9);
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  pointer-events: auto;
}

.subtitle-removal-region-overlay-tools button:hover:not(:disabled) {
  border-color: rgba(53, 191, 255, 0.72);
  color: #fff;
}

.subtitle-removal-region-overlay-tools button:disabled {
  cursor: default;
  opacity: 0.38;
}

.subtitle-removal-region-box,
.subtitle-removal-region-draft {
  position: absolute;
  min-width: 2px;
  min-height: 2px;
  border: 2px solid #53bfff;
  border-radius: 4px;
  background: rgba(53, 191, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.46), 0 0 20px rgba(53, 191, 255, 0.16);
}

.subtitle-removal-region-box {
  padding: 0;
  cursor: pointer;
}

.subtitle-removal-region-box > span {
  position: absolute;
  top: 3px;
  left: 3px;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(5, 14, 26, 0.82);
  color: #d7f3ff;
  font-size: 10px;
  font-weight: 850;
}

.subtitle-removal-error {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(233, 147, 138, 0.28);
  border-radius: 9px;
  background: rgba(112, 37, 43, 0.14);
  color: #efb1ab;
  font-size: 10px;
  line-height: 1.45;
}

.subtitle-removal-bottom-bar {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  justify-content: start;
  gap: 8px;
  width: max-content;
  max-width: 100%;
}

.subtitle-removal-bottom-bar .drawer-mode-row {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 8px;
  width: max-content;
}

.subtitle-removal-bottom-bar .compact-select-pill {
  flex: 0 0 auto;
  width: 124px;
  min-width: 124px;
  padding-inline: 7px;
}

.subtitle-removal-bottom-bar .compact-select-pill:nth-child(2) {
  width: 142px;
  min-width: 142px;
}

.subtitle-removal-bottom-bar .compact-select-pill select {
  min-width: 0;
  width: 100%;
  font-size: 12px;
}

.subtitle-removal-actions {
  position: static;
  display: grid;
  grid-template-columns: max-content 38px;
  flex: 0 0 auto;
  gap: 7px;
  min-width: 0;
  padding-top: 0;
  background: transparent;
}

.subtitle-removal-actions .node-generate-shell {
  grid-template-columns: 42px 106px;
  gap: 4px;
}

.subtitle-removal-actions .subtitle-removal-run {
  min-width: 0;
  white-space: nowrap;
}

.subtitle-removal-actions .node-icon-action {
  width: 38px;
  min-width: 38px;
}

.subtitle-removal-run:disabled {
  cursor: wait;
  opacity: 0.62;
}

@media (max-width: 760px) {
  .subtitle-removal-drawer-status {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .subtitle-removal-bottom-bar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    width: 100%;
  }

  .subtitle-removal-bottom-bar .drawer-mode-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .subtitle-removal-bottom-bar .compact-select-pill,
  .subtitle-removal-bottom-bar .compact-select-pill:nth-child(2) {
    width: 100%;
    min-width: 0;
  }

  .subtitle-removal-actions {
    align-self: end;
  }

}
