/* Comparison View Styles */

/* Comparison Grid */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--spacing-lg);
  align-items: start;
}

@media (max-width: 1024px) {
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .comparison-divider {
    display: none;
  }
}

/* Comparison Column */
.comparison-column {
  flex: 1;
  min-width: 0;
}

.comparison-header {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--color-gray-200);
}

.comparison-header h4 {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-gray-900);
}

/* Comparison Divider */
.comparison-divider {
  width: 1px;
  background-color: var(--color-gray-200);
  align-self: stretch;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Comparison Indicator */
.comparison-indicator {
  position: absolute;
  background: white;
  padding: var(--spacing-md);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
}

.indicator {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-weight: 600;
  font-size: var(--font-size-lg);
}

.indicator__icon {
  width: 1.5rem;
  height: 1.5rem;
}

.indicator--success {
  color: var(--color-success);
}

.indicator--danger {
  color: var(--color-danger);
}

.indicator--neutral {
  color: var(--color-gray-500);
}

/* Comparison Metrics */
.comparison-metrics {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.metric {
  text-align: center;
}

.metric__label {
  font-size: var(--font-size-sm);
  color: var(--color-gray-600);
  margin-bottom: var(--spacing-xs);
}

.metric__value {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-gray-900);
}

.metric__value--large {
  font-size: var(--font-size-2xl);
}

/* Comparison Content */
.comparison-content {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.comparison-section {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.comparison-section__title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-gray-700);
  margin: 0;
}

/* Prompt Content for Comparison */
.prompt-content--comparison {
  background-color: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 400px;
  overflow-y: auto;
  margin: 0;
}

/* Comparison List */
.comparison-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--spacing-sm) var(--spacing-md);
  margin: 0;
}

.comparison-list dt {
  font-weight: 500;
  color: var(--color-gray-600);
  font-size: var(--font-size-sm);
}

.comparison-list dd {
  font-weight: 500;
  color: var(--color-gray-900);
  margin: 0;
}

/* Table Checkbox Column */
.table__checkbox-column {
  width: 60px;
  text-align: center;
  padding: var(--spacing-sm);
}

.compare-checkbox {
  cursor: pointer;
  width: 1rem;
  height: 1rem;
}

.compare-checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Visual Diff Highlighting */
.diff-added {
  background-color: rgba(34, 197, 94, 0.1);
  color: var(--color-success);
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
}

.diff-removed {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  text-decoration: line-through;
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
}

.diff-changed {
  background-color: rgba(251, 146, 60, 0.1);
  color: var(--color-warning);
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
}

/* Text Utilities for Comparison */
.text-warning {
  color: var(--color-warning);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .comparison-grid {
    gap: var(--spacing-md);
  }
  
  .comparison-header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-xs);
  }
  
  .comparison-metrics {
    flex-direction: row;
    justify-content: space-around;
  }
  
  .metric {
    flex: 1;
  }
  
  .prompt-content--comparison {
    max-height: 300px;
    font-size: var(--font-size-xs);
  }
}