/** Generic helpers */

[hidden] { display: none !important; }

/** Notice */

.notice {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--warn-soft);
  border: 1px solid color-mix(in srgb, var(--warn) 33%, transparent);
  border-radius: 8px;
  font-size: 12.5px; color: var(--ink);
}

.notice p { margin: 0; }

.notice strong { font-weight: 600; }

.notice__icon {
  flex-shrink: 0; width: 14px; height: 14px;
  fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round;
}

/** Switch — styled `<input type="checkbox" role="switch">`. */

input[type="checkbox"][role="switch"] {
  appearance: none;
  -webkit-appearance: none;
  width: 32px; height: 18px;
  border-radius: 999px;
  background: var(--line);
  border: 0;
  position: relative;
  cursor: pointer;
  margin: 0;
  vertical-align: middle;
  transition: background .15s ease;
}

input[type="checkbox"][role="switch"]::before {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
  transition: transform .15s ease;
}

input[type="checkbox"][role="switch"]:checked {
  background: var(--accent);
}

input[type="checkbox"][role="switch"]:checked::before {
  transform: translateX(14px);
}

input[type="checkbox"][role="switch"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/** Pipeline options list */

#options-list {
  display: flex; flex-direction: column;
  gap: 16px;
}

.option-list {
  display: flex; flex-direction: column;
  gap: 18px;
}

.option-item {
  display: flex; flex-direction: column;
  gap: 6px;
}

.option-item__head {
  display: inline-flex; align-items: center;
  gap: 10px;
  cursor: pointer;
}

.option-item__head strong {
  font: 600 14px/1.2 var(--font-sans);
  color: var(--ink);
}

.option-item__desc {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}

/** Tooltip — JS-driven, attached to <body> so it escapes card overflow. */

.tooltip {
  position: fixed;
  top: 0; left: 0;
  padding: 7px 10px;
  background: var(--ink);
  color: var(--panel);
  border-radius: var(--r-md);
  font: 500 12px/1.4 var(--font-sans);
  text-align: center;
  text-wrap: pretty;
  max-width: 240px;
  width: max-content;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s ease;
  z-index: 1000;
  box-shadow: var(--shadow-dropdown);
}

.tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transition-delay: .15s;
}

.tooltip::before {
  content: "";
  position: absolute;
  left: var(--arrow-x, 50%);
  width: 0;
  height: 0;
  margin-left: -5px;
  border: 5px solid transparent;
}

.tooltip[data-placement="top"]::before {
  bottom: -9px;
  border-top-color: var(--ink);
}

.tooltip[data-placement="bottom"]::before {
  top: -9px;
  border-bottom-color: var(--ink);
}