/* IBM i Source Import - Supplemental Styles
 * Base styles (step indicator, cards, forms, progress, review) come from ibmi-import.css.
 * This file adds styles unique to the Import Sources tool.
 */

/* =============================================================================
   Step 2: Library Table
   ============================================================================= */

.library-table-container {
  overflow-x: auto;
}

.library-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.library-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  border-bottom: 2px solid var(--color-border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.library-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.library-table tbody tr {
  cursor: pointer;
}

.library-table tr:hover {
  background: var(--color-surface-hover, rgba(0, 0, 0, 0.02));
}

.library-table tr.invalid-row {
  background: var(--color-danger-bg, rgba(239, 68, 68, 0.04));
}

.col-select { width: 40px; text-align: center; }
.col-library { width: 160px; }
.col-text { }
.col-actions { width: 48px; text-align: center; }

.library-table code {
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 13px;
  font-weight: 600;
}

.validating {
  color: var(--color-text-muted);
  font-style: italic;
}

.btn-icon-sm {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: none;
  color: var(--color-text-muted, #94a3b8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-icon-sm:hover {
  background: var(--color-surface-hover, #f1f5f9);
  color: var(--color-text-secondary, #64748b);
}

.btn-icon-sm.btn-delete:hover {
  background: var(--color-danger-bg, rgba(239, 68, 68, 0.1));
  color: var(--color-danger, #ef4444);
}

.table-empty-state {
  text-align: center;
  padding: 32px;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* =============================================================================
   Add Libraries Dialog
   ============================================================================= */

.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.dialog {
  background: var(--color-surface, #fff);
  border-radius: var(--radius-large, 20px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.dialog-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dialog-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.dialog-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 4px;
  line-height: 1;
}

.dialog-close:hover {
  color: var(--color-text);
}

.dialog-body {
  padding: 20px 24px;
}

.dialog-body p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.dialog-body textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-mono, 'Fira Code', monospace);
  font-size: 13px;
  resize: vertical;
  background: var(--color-surface, #fff);
  color: var(--color-text);
}

.dialog-body textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(63, 114, 255, 0.12);
}

.dialog-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* =============================================================================
   Step 3: Import progress
   ============================================================================= */

.import-phase {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--color-text);
}

.progress-bar-indeterminate {
  width: 20% !important;
  animation: indeterminate 3s ease-in-out infinite;
}

@keyframes indeterminate {
  0%   { margin-left: 0;   }
  50%  { margin-left: 80%; }
  100% { margin-left: 0;   }
}
