﻿:root {
  --color-primary: #22a06b; /* A rich jade green – vibrant, trustworthy, and professional */
  --color-accent: #562c6a; /* Deep plum – elegant, magical, adds depth */
  --color-bg: #e8e8e3; /* Misty soft gray – calm, gentle, reduces visual strain */
  --color-surface: #ffffff; /* Pure white – clean, crisp, used for content areas */
  --color-text: #1a1a1a; /* Deep charcoal – high contrast for readable text */
  --color-muted-text: #4b4b4b; /* Medium gray – used for subtext or less prominent elements */
  --color-alert: #ef4444; /* Vivid coral red – immediate attention, used for errors */
  --color-border: #d1d5db; /* Light gray-blue – subtle but defined for borders */

  --bs-primary: var(--color-primary);
  --bs-secondary: var(--color-muted-text);
  --bs-success: #16a34a; /* Emerald green – for success messages */
  --bs-info: #2dd4bf; /* Aqua teal – fresh, modern for info alerts */
  --bs-warning: #facc15; /* Bright gold – soft alert or warning signal */
  --bs-danger: var(--color-alert);
  --bs-light: var(--color-surface);
  --bs-dark: var(--color-text);
  --bs-body-bg: var(--color-bg);
  --bs-body-color: var(--color-text);
  --bs-border-radius: 0.5rem;
  --radius: 0.5rem;
  --shadow: 0 2px 8px rgba(34, 160, 107, 0.08); /* Soft greenish shadow */

  --background-light: var(--color-surface);
  --primary-green: var(--color-primary);
  --primary-green-dark: #178154; /* Darker shade of jade green – used for hover states */
  --primary-green-light: #d1fae5; /* Pale mint green – soft and supportive backgrounds */
  --accent: var(--color-accent);
}

body {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--bs-dark);
  font-weight: 600;
}

.table {
  background: var(--background-light);
  border-radius: var(--bs-border-radius);
  overflow: hidden;
}

.table tbody tr:hover {
  background-color: #f5f5f5;
}

/* Card styling used in platform cards */
.card, .shadow-sm, .platform-card {
  border-radius: var(--bs-border-radius);
  box-shadow: var(--shadow);
  background: var(--primary-green-light);
  border: 1px solid #e2e8f0;
  padding: 1rem;
}

.platform-card {
  background: var(--background-light);
  border: 1px solid #b5e4d0;
  padding: 1.5rem 1rem;
  transition: box-shadow 0.2s, border 0.2s;
  color: var(--primary-green);
}

  .platform-card .card-title {
    color: var(--primary-green);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
  }

  .platform-card .card-text {
    color: var(--primary-green);
    font-size: 1rem;
  }

.platform-mnemonic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* Workspace and save functionality */
.save-workspace-container {
  background: var(--primary-green-light);
  border-radius: 12px;
  border: 1px solid var(--primary-green);
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 1rem;
  margin-top: 1rem;
  text-align: center;
}

.save-workspace-btn {
  background: var(--primary-green);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

  .save-workspace-btn:hover,
  .save-workspace-btn:focus {
    background: var(--primary-green-dark);
  }

/* Section styling for WorkspaceListPage */
.section-divider {
  border: none;
  border-top: 6px solid #13b0a6;
  margin: 32px 0 24px 0;
  box-shadow: 0 2px 4px rgba(19,176,166,0.15);
}

.section-table {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(19,176,166,0.08);
  background: #fff;
  margin-bottom: 1rem;
  overflow: hidden;
}

/* Row selection styling */
.selected-row {
  background-color: #e3f2fd !important;
  border-left: 4px solid #1976d2;
}

.selected-row:hover {
  background-color: #e3f2fd !important;
}

.chevron-right {
  color: #333;
  font-size: 12px;
  font-weight: bold;
}

/* Topbar styling */
.topbar {
  background: #13b0a6;
  padding: 1rem 2rem;
}

  .topbar h2 {
    color: #fff;
    margin: 0;
  }

/* Waitlist section - only used in landing page components */
.waitlist-section {
  margin: 2.5rem auto;
  padding: 2rem 2rem;
  text-align: center;
  max-width: 960px;
  background: var(--primary-green-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

  .waitlist-section h3 {
    color: var(--primary-green);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
  }

/* ThreadTurnList Component Styles */
.thread-turn-list-container {
  width: 100%;
  display: flex; /* Changed to flex to control child positioning */
  justify-content: flex-start; /* This left-justifies the child div */
  align-items: flex-start;
  padding: 20px; /* Add padding to create margin space */
}

.thread-turn-content {
  /* This div will now be left-justified within its parent */
  display: block;
  width: 100%; /* Take full width of parent */
  max-width: 100%;
}

/* Conversation turns */
.chat-container {
  width: calc(100% - 40px); /* Fill available space minus margin */
  margin: 20px; /* Creates margin inside the outer box */
  padding: 20px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background-color: #ffffff;
  display: block;
}

.turn-wrapper {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
}

  .turn-wrapper.system {
    justify-content: center; /* System messages centered */
  }

  .turn-wrapper.user {
    justify-content: flex-end; /* User messages on the right */
  }

  .turn-wrapper.assistant {
    justify-content: flex-start; /* Assistant messages on the left */
  }

.turn-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
  word-wrap: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

  .turn-bubble.system {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #6c757d;
    text-align: center;
    max-width: 90%;
  }

  .turn-bubble.user {
    background-color: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
  }

  .turn-bubble.assistant {
    background-color: #e9ecef;
    color: #333;
    border-bottom-left-radius: 4px;
  }

  .turn-bubble.selected {
    box-shadow: 0 0 0 2px #007bff;
  }

.exclude-toggle {
  margin-left: 8px;
  cursor: pointer;
  font-size: 16px;
  color: #6c757d;
  transition: color 0.2s;
}

  .exclude-toggle:hover {
    color: #007bff;
  }

  .exclude-toggle.excluded {
    color: #28a745;
  }

.turn-meta {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 4px;
  text-align: left; /* This left-justifies the text */
}

/* User Input Area */
.user-input-container {
  margin-top: 20px;
  border-top: 1px solid #dee2e6;
  padding-top: 20px;
}

.user-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.user-input-textarea {
  flex: 1;
  min-height: 60px;
  padding: 12px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

.user-input-textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.user-input-textarea::placeholder {
  color: #6c757d;
}

.process-turns-btn {
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
  height: fit-content;
}

.process-turns-btn:hover:not(:disabled) {
  background-color: #0056b3;
}

.process-turns-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.process-turns-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.5);
}