/* ============================================================================
   Teamsbot Feature Styles
   ============================================================================ */

/* Dashboard */
.dashboardContainer {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem;
  max-width: 960px;
}

.startSessionCard {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  padding: 1.5rem;
}

.cardTitle {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.cardDescription {
  margin: 0 0 1rem 0;
  color: var(--text-secondary, #666);
  font-size: 0.9rem;
}

.formGroup {
  margin-bottom: 1rem;
}

.formRow {
  display: flex;
  gap: 1rem;
}

.formRow .formGroup {
  flex: 1;
}

.label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary, #333);
}

.hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-tertiary, #999);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--input-bg, #fff);
  color: var(--text-primary, #333);
  box-sizing: border-box;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--primary-color, #4A90D9);
  box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.15);
}

.textarea {
  resize: vertical;
  font-family: inherit;
  min-height: 100px;
}

.startButton,
.saveButton {
  padding: 0.6rem 1.5rem;
  background: var(--primary-color, #4A90D9);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.startButton:hover,
.saveButton:hover {
  background: var(--primary-hover, #3A7BC8);
}

.startButton:disabled,
.saveButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.stopButton {
  padding: 0.4rem 1rem;
  background: var(--danger-color, #D94A4A);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

.stopButton:hover {
  background: var(--danger-hover, #C83A3A);
}

.viewButton {
  padding: 0.4rem 1rem;
  background: var(--surface-color, #f5f5f5);
  color: var(--primary-color, #4A90D9);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}

.deleteButton {
  padding: 0.4rem 1rem;
  background: transparent;
  color: var(--danger-color, #D94A4A);
  border: 1px solid var(--danger-color, #D94A4A);
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Error/Success Banners */
.errorBanner {
  background: rgba(217, 74, 74, 0.1);
  color: var(--danger-color, #D94A4A);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  border-left: 3px solid var(--danger-color, #D94A4A);
}

.successBanner {
  background: rgba(74, 217, 154, 0.1);
  color: var(--success-color, #2D8E5C);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  border-left: 3px solid var(--success-color, #2D8E5C);
}

/* User Account / MFA */
.credentialsCard {
  background: var(--surface-color, #f9f9f9);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-top: 0.5rem;
}

.credentialsInfo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  gap: 0.5rem;
}

.credentialsEmail {
  font-weight: 500;
  color: var(--text-color, #333);
}

.checkboxRow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.mfaOverlay {
  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;
}

.mfaDialog {
  background: var(--surface-color, #fff);
  border-radius: 12px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.mfaTitle {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color, #333);
}

.mfaNumber {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color, #4A90D9);
  margin: 1rem 0;
  letter-spacing: 0.1em;
}

.mfaPrompt {
  font-size: 0.9rem;
  color: var(--text-secondary, #666);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.mfaCodeInput {
  width: 100%;
  padding: 0.75rem;
  font-size: 1.2rem;
  text-align: center;
  letter-spacing: 0.2em;
  border: 2px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.mfaCodeInput:focus {
  border-color: var(--primary-color, #4A90D9);
  outline: none;
}

.mfaSpinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-color, #e0e0e0);
  border-top-color: var(--primary-color, #4A90D9);
  border-radius: 50%;
  animation: mfaSpin 0.8s linear infinite;
  margin: 1rem auto;
}

@keyframes mfaSpin {
  to { transform: rotate(360deg); }
}

/* Section */
.sectionContainer {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  padding: 1.5rem;
}

.sectionTitle {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #333);
}

/* Session List */
.sessionList {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sessionCard {
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  padding: 1rem;
  background: var(--surface-alt, #fafafa);
}

.sessionHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.sessionBotName {
  font-weight: 600;
  font-size: 0.95rem;
}

.sessionMeta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary, #666);
  margin-bottom: 0.5rem;
}

.sessionActions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.sessionSummary {
  font-size: 0.85rem;
  color: var(--text-secondary, #666);
  background: var(--surface-color, #fff);
  padding: 0.5rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

.sessionError {
  font-size: 0.85rem;
  color: var(--danger-color, #D94A4A);
  margin-top: 0.5rem;
}

/* Status Badges */
.statusBadge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.statusActive {
  background: rgba(74, 217, 154, 0.15);
  color: #2D8E5C;
}

.statusJoining,
.statusPending {
  background: rgba(74, 144, 217, 0.15);
  color: #4A90D9;
}

.statusEnded {
  background: rgba(128, 128, 128, 0.15);
  color: #666;
}

.statusError {
  background: rgba(217, 74, 74, 0.15);
  color: #D94A4A;
}

.statusLeaving {
  background: rgba(217, 168, 74, 0.15);
  color: #B8860B;
}

.liveBadge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: #D94A4A;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.emptyState {
  color: var(--text-tertiary, #999);
  font-size: 0.9rem;
  padding: 2rem;
  text-align: center;
}

.loading {
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary, #666);
}

/* ============================================================================
   Session View
   ============================================================================ */

.sessionContainer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  height: 100%;
}

.sessionViewHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
}

.sessionInfo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sessionTitle {
  margin: 0;
  font-size: 1.1rem;
}

.sessionControls {
  display: flex;
  gap: 0.5rem;
}

.sessionContent {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  flex: 1;
  min-height: 0;
}

/* Transcript Panel */
.transcriptPanel,
.responsesPanel {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panelTitle {
  margin: 0;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  background: var(--surface-alt, #fafafa);
}

.transcriptList,
.responseList {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.transcriptItem {
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.transcriptItem:hover {
  background: var(--surface-alt, #f5f5f5);
}

.transcriptTime {
  color: var(--text-tertiary, #999);
  font-size: 0.75rem;
  flex-shrink: 0;
  min-width: 55px;
}

.transcriptSpeaker {
  font-weight: 600;
  flex-shrink: 0;
}

.transcriptText {
  color: var(--text-primary, #333);
}

/* Response Items */
.responseItem {
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--surface-alt, #fafafa);
}

.responseHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.responseIntent {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary-color, #4A90D9);
}

.responseTime {
  font-size: 0.75rem;
  color: var(--text-tertiary, #999);
}

.responseText {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-primary, #333);
}

.responseReasoning {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary, #666);
}

.responseMeta {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-tertiary, #999);
}

/* Summary Card */
.summaryCard {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  overflow: hidden;
}

.summaryText {
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary, #333);
  white-space: pre-wrap;
}

/* ============================================================================
   Settings View
   ============================================================================ */

.settingsContainer {
  padding: 1rem;
  max-width: 720px;
}

.settingsCard {
  background: var(--surface-color, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  padding: 1.5rem;
}

.settingsSection {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.settingsSection:last-of-type {
  border-bottom: none;
}

.settingsActions {
  display: flex;
  justify-content: flex-end;
  padding-top: 1rem;
}

/* ============================================================================
   Auth Detection Test Section
   ============================================================================ */

.testSection {
  margin-bottom: 2rem;
  padding: 1.25rem;
  border: 1px solid var(--primary-color, #4A90D9);
  border-radius: 8px;
  background: rgba(74, 144, 217, 0.04);
}

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

.testSectionTitle {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color, #4A90D9);
}

.testInputRow {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.testInputRow .input {
  flex: 1;
}

.testButton {
  padding: 0.5rem 1.25rem;
  background: var(--primary-color, #4A90D9);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s;
}

.testButton:hover {
  background: var(--primary-hover, #3A7BC8);
}

.testButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.testProgress {
  font-size: 0.85rem;
  color: var(--text-secondary, #666);
  padding: 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.testResultsTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.testResultsTable th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--border-color, #e0e0e0);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-secondary, #666);
  white-space: nowrap;
}

.testResultsTable td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  vertical-align: middle;
}

.testResultsTable tr:last-child td {
  border-bottom: none;
}

.testBadgeV2 {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(74, 217, 154, 0.15);
  color: #2D8E5C;
}

.testBadgeLightMeetings {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(217, 168, 74, 0.15);
  color: #B8860B;
}

.testBadgeError {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(217, 74, 74, 0.15);
  color: #D94A4A;
}

.testBadgeUnknown {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(128, 128, 128, 0.15);
  color: #666;
}

.testCheckmark {
  color: #2D8E5C;
  font-weight: 600;
}

.testCross {
  color: #D94A4A;
  font-weight: 600;
}

.testDash {
  color: var(--text-tertiary, #999);
}

.testRecommendation {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(74, 144, 217, 0.08);
  border-radius: 6px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-primary, #333);
  border-left: 3px solid var(--primary-color, #4A90D9);
}

.testScreenshotButtons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.testScreenshotButton {
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 4px;
  background: var(--surface-color, #fff);
  color: var(--primary-color, #4A90D9);
  font-size: 0.7rem;
  cursor: pointer;
  white-space: nowrap;
}

.testScreenshotButton:hover {
  background: var(--surface-alt, #f5f5f5);
}

.testScreenshotOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: pointer;
}

.testScreenshotImage {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.testScreenshotCaption {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.5rem 1rem;
  border-radius: 6px;
}

.testErrorText {
  font-size: 0.75rem;
  color: var(--danger-color, #D94A4A);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.testVariantName {
  font-weight: 500;
}

.testDuration {
  font-size: 0.8rem;
  color: var(--text-tertiary, #999);
  white-space: nowrap;
}

.testSignals {
  font-size: 0.75rem;
  color: var(--text-tertiary, #999);
  max-width: 250px;
}

/* Variant cell with expand toggle */
.testVariantCell {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.testLogToggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.15rem;
  font-size: 0.7rem;
  color: var(--text-secondary, #666);
  border-radius: 3px;
  flex-shrink: 0;
}

.testLogToggle:hover {
  background: var(--surface-alt, #f5f5f5);
  color: var(--primary-color, #4A90D9);
}

/* Log row */
.testLogRow td {
  padding: 0 !important;
  border-top: none !important;
}

.testLogContainer {
  background: var(--surface-dark, #1e1e1e);
  color: var(--text-light, #d4d4d4);
  font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
  font-size: 0.72rem;
  line-height: 1.5;
  padding: 0.5rem 0.75rem;
  max-height: 200px;
  overflow-y: auto;
  border-radius: 0 0 4px 4px;
  margin: 0 0.5rem 0.5rem;
}

.testLogLine {
  white-space: pre-wrap;
  word-break: break-all;
  padding: 0.05rem 0;
}

.testLogInfo {
  color: var(--text-light, #d4d4d4);
}

.testLogWarn {
  color: #e5a100;
}

.testLogError {
  color: #f14c4c;
}

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

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