/**
 * Config Validator Panel Styles
 * =============================
 */

/* Panel Container */
.config-validator-panel {
  background: var(--surface-color, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

/* Header */
.validator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--surface-secondary, #f8fafc);
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.validator-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

.validator-title i {
  width: 18px;
  height: 18px;
  color: var(--primary-color, #3b82f6);
}

.validator-refresh-btn {
  padding: 0.5rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary, #64748b);
  transition: all 0.2s;
}

.validator-refresh-btn:hover {
  background: var(--hover-bg, #e2e8f0);
  color: var(--primary-color, #3b82f6);
}

.validator-refresh-btn i {
  width: 16px;
  height: 16px;
}

/* Body */
.validator-body {
  padding: 1.25rem;
}

/* Loading State */
.validator-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  color: var(--text-secondary, #64748b);
}

.validator-loading .spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


/* Status Banner */
.validator-status {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.validator-status-ready {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
}

.validator-status-ready_with_warnings {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
}

.validator-status-blocked {
  background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
  border: 1px solid #f87171;
}

.status-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.validator-status-ready .status-icon { background: #10b981; color: white; }
.validator-status-ready_with_warnings .status-icon { background: #f59e0b; color: white; }
.validator-status-blocked .status-icon { background: #ef4444; color: white; }

.status-icon i {
  width: 18px;
  height: 18px;
}

.status-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.status-title {
  font-weight: 600;
  font-size: 1rem;
}

.validator-status-ready .status-title { color: #065f46; }
.validator-status-ready_with_warnings .status-title { color: #92400e; }
.validator-status-blocked .status-title { color: #991b1b; }

.status-message {
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
}

/* AI Explanation Box */
.validator-ai-explanation {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #7dd3fc;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.ai-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 0.5rem;
}

.ai-header i {
  width: 16px;
  height: 16px;
}

.ai-content {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #1e3a5f;
}


/* Sections */
.validator-section {
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
}

.validator-section-error {
  border: 1px solid #fca5a5;
}

.validator-section-warning {
  border: 1px solid #fcd34d;
}

.validator-section-info {
  border: 1px solid #93c5fd;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.validator-section-error .section-header { background: #fef2f2; color: #991b1b; }
.validator-section-warning .section-header { background: #fffbeb; color: #92400e; }
.validator-section-info .section-header { background: #eff6ff; color: #1e40af; }

.section-header i {
  width: 16px;
  height: 16px;
}

.section-items {
  padding: 0.5rem;
  background: var(--surface-color, #ffffff);
}

/* Individual Items */
.validator-item {
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  background: var(--surface-secondary, #f8fafc);
}

.validator-item:last-child {
  margin-bottom: 0;
}

.item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.item-name {
  font-weight: 500;
  color: var(--text-primary, #1e293b);
}

.item-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
}

.item-status-error { background: #fee2e2; color: #991b1b; }
.item-status-warning { background: #fef3c7; color: #92400e; }
.item-status-recommendation { background: #dbeafe; color: #1e40af; }
.item-status-ok { background: #d1fae5; color: #065f46; }

.item-message {
  font-size: 0.875rem;
  color: var(--text-primary, #1e293b);
  margin-bottom: 0.25rem;
}

.item-details {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  margin-bottom: 0.5rem;
}

.item-fix {
  margin-top: 0.5rem;
}


/* Actions */
.validator-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

/* Error State */
.validator-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary, #64748b);
}

.validator-error i {
  width: 32px;
  height: 32px;
  color: #f59e0b;
}

/* Modal */
.validator-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.validator-modal {
  background: var(--surface-color, #ffffff);
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.validator-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.validator-modal .modal-header h3 {
  margin: 0;
  font-size: 1.125rem;
}

.modal-close {
  padding: 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  color: var(--text-secondary, #64748b);
}

.modal-close:hover {
  background: var(--hover-bg, #e2e8f0);
}

.validator-modal .modal-body {
  padding: 1.25rem;
  overflow-y: auto;
}

/* Fix Steps */
.fix-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fix-step {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  border-left: 4px solid;
}

.fix-step-critical {
  background: #fef2f2;
  border-left-color: #ef4444;
}

.fix-step-warning {
  background: #fffbeb;
  border-left-color: #f59e0b;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.step-number {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color, #3b82f6);
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
}

.step-action {
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

.step-type {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  background: var(--surface-secondary, #f8fafc);
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
}

.step-details {
  margin: 0.5rem 0 0.75rem 0;
  padding-left: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
}

.step-details li {
  margin-bottom: 0.25rem;
}
