/* Autoplug-specific styles (reuses sidebar-schedule classes for layout) */

/* Toggle switch */
.autoplug-toggle {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}

.autoplug-toggle--on {
  background: var(--accent);
}

.autoplug-toggle--off {
  background: var(--border);
}

.autoplug-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  transition: left 0.2s;
}

.autoplug-toggle--on::after {
  left: 14px;
}

.autoplug-toggle--off::after {
  left: 2px;
}

/* Editor (inline expand) — extends schedule-item-expanded */
.autoplug-editor {
  padding: 8px 12px;
  background: var(--bg-titlebar);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.autoplug-editor label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.autoplug-editor input,
.autoplug-editor textarea,
.autoplug-editor select {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  color: var(--ink-dark);
  font-size: 12px;
  font-family: inherit;
}

.autoplug-editor textarea {
  resize: vertical;
  min-height: 36px;
}

.autoplug-editor-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.autoplug-editor-row input[type="number"] {
  width: 60px;
}

.autoplug-editor-row-label {
  font-size: 11px;
  color: var(--ink-light);
}

.autoplug-editor-row .autoplug-delay-input {
  width: 50px;
}

.autoplug-editor-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Mode toggle — reuses sidebar-schedule-btn pattern */
.autoplug-mode-toggle {
  display: flex;
  gap: 2px;
}

.autoplug-mode-toggle button {
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--ink-light);
  cursor: pointer;
}

.autoplug-mode-toggle button:hover {
  background: var(--bg-hover);
  color: var(--ink-dark);
}

.autoplug-mode-toggle button.active {
  background: var(--bg-hover);
  color: var(--ink-dark);
}

/* Pool messages */
.autoplug-pool-section {
  margin-top: 4px;
}

.autoplug-pool-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font-size: 11px;
  color: var(--ink-dark);
}

.autoplug-pool-item span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.autoplug-pool-item button {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  opacity: 0.6;
}

.autoplug-pool-item button:hover {
  opacity: 1;
}

.autoplug-pool-add {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.autoplug-pool-add input {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  color: var(--ink-dark);
  font-size: 11px;
}

.autoplug-pool-add button {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  color: var(--ink-dark);
  font-size: 11px;
  cursor: pointer;
}

.autoplug-editor-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Tracking — progress bar */
.autoplug-tracking-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 2px;
}

.autoplug-tracking-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s;
}

/* Tracking — triggered / skipped */
.autoplug-tracking-triggered {
  color: #22c55e;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.autoplug-tracking-skipped {
  font-size: 10px;
  color: var(--ink-light);
  opacity: 0.6;
  margin-top: 2px;
}

/* Tracking skip button */
.autoplug-tracking-skip {
  background: none;
  border: none;
  color: var(--ink-light);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  flex-shrink: 0;
  opacity: 0.5;
}

.autoplug-tracking-skip:hover {
  opacity: 1;
  color: #ef4444;
}

/* LLM mode hint */
.autoplug-llm-hint {
  font-size: 11px;
  color: var(--ink-light);
  padding: 4px 0;
}

/* Full-width button in add form */
.autoplug-create-btn {
  width: 100%;
}
