.validation-columns-region {
  position: relative;
  width: 100%;
  overflow: visible;
  --auto-select-bubble-width: clamp(240px, 38vw, 360px);
  --auto-select-pointer-size: 8px;
  --auto-select-pointer-gap: 8px;
  --auto-select-floating-left: 40px;
  --auto-select-vertical-margin: 16px;
}

.auto-select-explanation {
  position: fixed;
  left: var(--auto-select-floating-left);
  top: 0;
  width: var(--auto-select-bubble-width);
  max-width: min(var(--auto-select-bubble-width), calc(100vw - 72px));
  padding: 0.75rem 0.9rem;
  background: #f8f9fb;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  color: #1f2937;
  font-size: 0.85rem;
  line-height: 1.35;
  z-index: 2000;
  transition: transform 0.2s ease, top 0.2s ease, opacity 0.2s ease;
  will-change: top, opacity;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
}

.auto-select-explanation.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.auto-select-explanation[hidden] {
  display: none !important;
}

.auto-select-explanation::before,
.auto-select-explanation::after {
  content: none;
}

.auto-select-explanation__summary {
  margin: 0;
}

.auto-explanation-bubble {
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  color: #1F1F1F;
  opacity: 0;
  transition: opacity 120ms ease;
}

.auto-select-explanation__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e1e4e8;
}

.auto-select-explanation__icon {
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auto-select-explanation__title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1f2937;
  line-height: 1;
}

.auto-explanation-bubble strong {
  font-weight: 600;
}

.auto-explanation-bubble p {
  margin: 0 0 6px 0;
}

.auto-explanation-bubble .section-block {
  margin-bottom: 12px;
}

.auto-explanation-bubble .confidence-block {
  margin-top: 4px;
  margin-bottom: 0;
}

.auto-select-explanation__controls {
  margin-top: 0.35rem;
}

.auto-select-explanation__toggle {
  font: inherit;
  font-size: 0.8rem;
  color: #0b4aa8;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.auto-select-explanation__toggle:focus-visible {
  outline: 2px solid rgba(11, 74, 168, 0.35);
  outline-offset: 2px;
}

.auto-select-explanation__reasons {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
  list-style: disc;
  color: #475569;
  font-size: 0.78rem;
}

.auto-select-explanation__reasons li {
  margin-bottom: 0.2rem;
}

.auto-select-explainer-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #d0d7de;
  background: #f8f9fb;
  color: #1f2937;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.auto-select-explainer-toggle__icon {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.auto-select-explainer-toggle.is-active {
  border-color: #0b4aa8;
  box-shadow: 0 0 0 3px rgba(11, 74, 168, 0.16);
  background: #e9f1ff;
}

.auto-select-explainer-toggle[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.auto-select-explainer-trigger {
  position: absolute;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #fbbf24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  cursor: pointer;
  pointer-events: auto;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.auto-select-explainer-trigger::before {
  content: '▶';
  font-size: 0.95rem;
  font-weight: 700;
  display: inline-block;
  transform: translateX(1px);
}
.auto-select-explainer-trigger.dir-left::before {
  content: '◀';
  transform: translateX(-1px);
}
.auto-select-explainer-trigger.dir-right::before {
  content: '▶';
  transform: translateX(1px);
}

.auto-select-explainer-trigger.is-active {
  border-color: transparent;
  background: transparent;
  color: #fbbf24;
  box-shadow: none;
}
