/* ===================================================================
 * Test Case Batch feature styles (.tc-*).
 *
 * Extracted from public/styles.css. Load order in index.html keeps
 * this file AFTER components/components.css and BEFORE styles.css.
 * =================================================================== */

@layer features {

/* ── Batch Test Case Creation Panel ── */
.tc-batch-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}
.tc-batch-overlay.hidden { display: none; }

.tc-batch-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}

.tc-batch-panel {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(1040px, 100%);
  max-height: min(92vh, 860px);
  background: var(--color-bg-surface);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

/* ── Sidebar ── */
.tc-batch-sidebar {
  width: 260px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  background: var(--color-bg-surface-alt);
  border-right: 1px solid var(--color-border-default);
}

.tc-batch-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--color-border-default);
}
.tc-batch-sidebar-header h3 {
  margin: 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}

.tc-batch-add-btn {
  padding: 4px 10px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  font-family: inherit;
}
.tc-batch-add-btn:hover {
  background: var(--c-brand-50);
  color: var(--color-accent);
}

.tc-batch-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.tc-batch-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s;
}
.tc-batch-sidebar-item:hover { background: var(--color-bg-surface-alt); }
.tc-batch-sidebar-item.active {
  background: var(--c-brand-50);
  border-left-color: var(--color-accent);
}
.tc-batch-sidebar-item.untitled .tc-batch-sidebar-item-title {
  color: var(--color-text-muted);
  font-style: italic;
}

.tc-batch-sidebar-item-title {
  flex: 1;
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-batch-sidebar-item-remove {
  display: none;
  padding: 2px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  line-height: 1;
}
.tc-batch-sidebar-item:hover .tc-batch-sidebar-item-remove { display: block; }
.tc-batch-sidebar-item-remove:hover { color: var(--color-danger-text); background: var(--color-danger-bg); }

.tc-batch-sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--color-border-default);
}
.tc-batch-count {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
}

/* ── Severity / Status dots ── */
.tc-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tc-dot-high   { background: var(--c-danger-500); }
.tc-dot-medium { background: var(--c-warning-500); }
.tc-dot-low    { background: var(--c-success-500); }
.tc-dot-ready  { background: var(--c-success-500); }
.tc-dot-draft  { background: var(--color-text-muted); }

/* ── Form area ── */
.tc-batch-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tc-batch-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px 12px;
  border-bottom: 1px solid var(--color-bg-surface-alt);
}
.tc-batch-form-header h3 {
  margin: 0;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}
.tc-batch-form-total {
  font-weight: var(--font-weight-regular);
  color: var(--color-text-muted);
}

.tc-batch-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tc-batch-close:hover { background: var(--color-bg-surface-alt); color: var(--color-text-primary); }

.tc-batch-form-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 24px;
}

/* ── Form fields ── */
.tc-field { margin-bottom: 16px; }
.tc-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary);
}
.tc-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.tc-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  background: var(--color-bg-surface-alt);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  font-family: inherit;
}
.tc-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(88, 80, 236, 0.12);
}
.tc-input::placeholder { color: var(--color-text-muted); }

.tc-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  background: var(--color-bg-surface-alt);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  font-family: inherit;
  resize: vertical;
  line-height: 1.5;
}
.tc-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(88, 80, 236, 0.12);
}
.tc-textarea::placeholder { color: var(--color-text-muted); }

.tc-hint {
  display: block;
  margin-top: 4px;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* ── Button group (Severity / Status) ── */
.tc-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tc-btn-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.tc-btn-option:hover { background: var(--color-bg-surface-alt); border-color: var(--color-border-default); }

.tc-btn-option.active {
  background: var(--color-bg-surface-alt);
  border-color: var(--color-text-muted);
  color: var(--color-text-primary);
}
.tc-btn-sev-high.active   { background: var(--color-danger-bg); border-color: var(--color-danger-bg); color: var(--color-danger-text); }
.tc-btn-sev-medium.active { background: var(--color-warning-bg); border-color: var(--color-warning-bg); color: var(--color-warning-text); }
.tc-btn-sev-low.active    { background: var(--color-success-bg); border-color: var(--color-success-bg); color: var(--color-success-text); }
.tc-btn-status-ready.active { background: var(--color-success-bg); border-color: var(--color-success-bg); color: var(--color-success-text); }
.tc-btn-status-draft.active { background: var(--color-bg-surface-alt); border-color: var(--color-text-muted); color: var(--color-text-secondary); }

/* ── Test data datasets ── */
.tc-dataset-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.tc-dataset-row .tc-textarea { flex: 1; }
.tc-dataset-remove {
  flex-shrink: 0;
  margin-top: 6px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  line-height: 1;
}
.tc-dataset-remove:hover { color: var(--color-danger-text); background: var(--color-danger-bg); }

.tc-add-dataset-btn {
  padding: 0;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-accent);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.tc-add-dataset-btn:hover { color: var(--color-accent-active); background: transparent; }

/* ── Footer ── */
.tc-batch-form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--color-border-default);
}

.tc-batch-btn {
  padding: 10px 22px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  border: none;
  transition: background 0.12s;
}
.tc-batch-btn:disabled { opacity: 0.5; cursor: default; }

.tc-batch-btn--secondary {
  background: var(--color-bg-surface-alt);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-default);
}
.tc-batch-btn--secondary:hover { background: var(--color-border-default); color: var(--color-text-primary); }

.tc-batch-btn--primary {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}
.tc-batch-btn--primary:hover { background: var(--color-accent-hover); }

.tc-batch-btn--danger {
  background: var(--c-danger-500);
  color: var(--color-text-inverse);
}
.tc-batch-btn--danger:hover { background: var(--c-danger-700); }

/* ── Discard confirm dialog ── */
.tc-confirm-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 14px;
}
.tc-confirm-overlay.hidden { display: none; }

.tc-confirm-dialog {
  background: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: min(400px, 90%);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.2);
}
.tc-confirm-dialog h4 {
  margin: 0 0 8px;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
}
.tc-confirm-dialog p {
  margin: 0 0 20px;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}
.tc-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

} /* end @layer features */
