/* ========== Simulator Tab Styles ========== */

/* Follows the same patterns as agentInfo (info-section-card, info-label, etc.) */

/* Conversation Log */

.simulator-conversation-log {
  max-height: 500px;
  overflow-y: auto;
  padding: 16px;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: var(--bs-body-bg);
}

.simulator-conversation-log::-webkit-scrollbar {
  width: 6px;
}

.simulator-conversation-log::-webkit-scrollbar-thumb {
  background: rgba(142, 9, 249, 0.3);
  border-radius: 3px;
}

/* Messages */

.simulator-message {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 85%;
  position: relative;
  animation: simMsgFadeIn 0.3s ease;
}

@keyframes simMsgFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.simulator-message.tester {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

html[data-bs-theme="dark"] .simulator-message.tester {
  background: linear-gradient(135deg, #1a237e, #283593);
  color: #e8eaf6;
}

.simulator-message.agent {
  background: linear-gradient(135deg, #f3e5f5, #e1bee7);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

html[data-bs-theme="dark"] .simulator-message.agent {
  background: linear-gradient(135deg, #4a148c, #6a1b9a);
  color: #f3e5f5;
}

.simulator-message-role {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  opacity: 0.7;
}

.simulator-message-content {
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Agent message metadata toggle */

.simulator-message-meta {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(0,0,0,0.1);
  font-size: 0.75rem;
  color: #666;
}

html[data-bs-theme="dark"] .simulator-message-meta {
  border-top-color: rgba(255,255,255,0.1);
  color: #aaa;
}

.simulator-meta-toggle {
  cursor: pointer;
  font-size: 0.7rem;
  color: #8e09f9;
  opacity: 0.7;
}

.simulator-meta-toggle:hover {
  opacity: 1;
}

/* Score Circle */

.simulator-score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-weight: 800;
  font-size: 2rem;
  border: 5px solid;
  transition: all 0.5s ease;
}

.simulator-score-circle.score-high {
  border-color: #4caf50;
  color: #4caf50;
  background: rgba(76, 175, 80, 0.08);
}

.simulator-score-circle.score-medium {
  border-color: #ff9800;
  color: #ff9800;
  background: rgba(255, 152, 0, 0.08);
}

.simulator-score-circle.score-low {
  border-color: #f44336;
  color: #f44336;
  background: rgba(244, 67, 54, 0.08);
}

.simulator-score-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

/* Category Bars */

.simulator-category-bar {
  margin-bottom: 10px;
}

.simulator-category-bar .category-label {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 3px;
  display: flex;
  justify-content: space-between;
}

.simulator-category-bar .category-label .category-score {
  font-weight: 700;
  color: #8e09f9;
}

.simulator-category-bar .progress {
  height: 8px;
  border-radius: 4px;
}

.simulator-category-bar .progress-bar {
  border-radius: 4px;
  transition: width 0.8s ease;
}

/* Quick Scenario Chips */

.simulator-scenario-chip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(142, 9, 249, 0.3);
  background: transparent;
  color: var(--bs-body-color);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 3px;
}

.simulator-scenario-chip:hover {
  border-color: #8e09f9;
  background: rgba(142, 9, 249, 0.08);
}

.simulator-scenario-chip.active {
  background: #8e09f9;
  color: #fff;
  border-color: #8e09f9;
}

/* Test Mode Buttons */

.simulator-mode-btn {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid rgba(142, 9, 249, 0.3);
  background: transparent;
  color: var(--bs-body-color);
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.simulator-mode-btn:hover {
  border-color: #8e09f9;
  background: rgba(142, 9, 249, 0.08);
}

.simulator-mode-btn.active {
  background: #8e09f9;
  color: #fff;
  border-color: #8e09f9;
}

/* Report Card */

.simulator-report-card {
  border-radius: 16px;
  padding: 20px;
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border: 1px solid rgba(142, 9, 249, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

html[data-bs-theme="dark"] .simulator-report-card {
  background: linear-gradient(145deg, #1e1e1e, #151515);
  border-color: rgba(142, 9, 249, 0.2);
}

/* Strengths / Weaknesses / Recommendations lists */

.simulator-analysis-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.simulator-analysis-list li {
  padding: 6px 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

html[data-bs-theme="dark"] .simulator-analysis-list li {
  border-bottom-color: rgba(255,255,255,0.05);
}

.simulator-analysis-list li:last-child {
  border-bottom: none;
}

.simulator-analysis-list li::before {
  margin-right: 6px;
  font-size: 0.75rem;
}

.simulator-analysis-list.strengths li::before {
  content: "\f058";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #4caf50;
}

.simulator-analysis-list.weaknesses li::before {
  content: "\f057";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #f44336;
}

.simulator-analysis-list.recommendations li::before {
  content: "\f0eb";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #ff9800;
}

/* History table */

.simulator-history-table th {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
}

.simulator-history-table td {
  font-size: 0.85rem;
  vertical-align: middle;
}

.simulator-history-table tr {
  cursor: pointer;
  transition: background 0.2s;
}

.simulator-history-table tbody tr:hover {
  background: rgba(142, 9, 249, 0.04);
}

/* Score badges */

.simulator-score-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.simulator-score-badge.high {
  background: rgba(76,175,80,0.15);
  color: #2e7d32;
}

.simulator-score-badge.medium {
  background: rgba(255,152,0,0.15);
  color: #e65100;
}

.simulator-score-badge.low {
  background: rgba(244,67,54,0.15);
  color: #c62828;
}

html[data-bs-theme="dark"] .simulator-score-badge.high {
  background: rgba(76,175,80,0.25);
  color: #66bb6a;
}

html[data-bs-theme="dark"] .simulator-score-badge.medium {
  background: rgba(255,152,0,0.25);
  color: #ffa726;
}

html[data-bs-theme="dark"] .simulator-score-badge.low {
  background: rgba(244,67,54,0.25);
  color: #ef5350;
}

/* Status badges */

.simulator-status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.simulator-status-badge.completed {
  background: rgba(76,175,80,0.15);
  color: #2e7d32;
}

.simulator-status-badge.running {
  background: rgba(33,150,243,0.15);
  color: #1565c0;
}

.simulator-status-badge.failed {
  background: rgba(244,67,54,0.15);
  color: #c62828;
}

.simulator-status-badge.cancelled {
  background: rgba(158,158,158,0.15);
  color: #616161;
}

.simulator-status-badge.pending {
  background: rgba(255,152,0,0.15);
  color: #e65100;
}

/* Tool checkbox list */

.simulator-tool-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
}

/* Empty state */

.simulator-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.simulator-empty-state i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* Config panel sticky */

@media (min-width: 768px) {
  .simulator-config-panel {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
}

