/* ThreadLine Theme Colors */
:root {
  --threadline-teal: #1b9c85;
  --threadline-teal-dark: #178a76;
  --threadline-teal-light: #e8f8f5;
  --threadline-white: #ffffff;
  --threadline-mint: #e8f8f5;
  --threadline-text: #333333;
  --threadline-gray: #f1f5f9;
  --threadline-border: #e2e8f0;
}

/* Main Layout Styling */
body {
  background-color: var(--threadline-mint);
}

/* Sidebar Styling */
.sidebar-container {
  background-color: var(--threadline-teal);
  color: var(--threadline-white);
}

.sidebar-container h1 {
  color: var(--threadline-white);
  font-weight: 600;
}

.sidebar-link {
  color: var(--threadline-white);
  font-weight: 500;
  opacity: 0.9;
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  background-color: var(--threadline-teal-dark);
  color: var(--threadline-white);
  opacity: 1;
}

.sidebar-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--threadline-white);
  opacity: 1;
}

.sidebar-link svg {
  color: var(--threadline-white);
  opacity: 0.9;
}

/* Card styling */
.threadline-card {
  background-color: var(--threadline-white);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.threadline-card-title {
  color: var(--threadline-text);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Stats cards */
.stat-card {
  background-color: var(--threadline-mint);
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--threadline-text);
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Buttons */
.btn-primary {
  background-color: var(--threadline-teal);
  color: var(--threadline-white);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--threadline-teal-dark);
}

.btn-secondary {
  background-color: var(--threadline-white);
  color: var(--threadline-teal);
  border: 1px solid var(--threadline-teal);
}

.btn-secondary:hover {
  background-color: var(--threadline-mint);
}

/* Tables */
.threadline-table th {
  background-color: var(--threadline-gray);
  color: var(--threadline-text);
  font-weight: 600;
}

.threadline-table td {
  border-bottom: 1px solid var(--threadline-border);
}

.threadline-table tr:hover {
  background-color: var(--threadline-mint);
}

/* User profile circle */
.user-circle {
  background-color: #f8cb66;
  color: #333333;
}

/* Step circles */
.step-circle {
  background-color: var(--threadline-teal);
  color: var(--threadline-white);
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Header */
.main-header {
  background-color: var(--threadline-mint);
  border-bottom: 1px solid var(--threadline-border);
}

/* Animation for transcript highlight pulses */
@keyframes highlight-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(254, 240, 138, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(254, 240, 138, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(254, 240, 138, 0);
  }
}

.highlight-pulse {
  animation: highlight-pulse 1.25s cubic-bezier(0.4, 0, 0.6, 1) 2;
}

/* Mobile-responsive improvements */
@media (max-width: 640px) {
  /* Reduce padding on mobile */
  .threadline-card {
    padding: 1rem;
  }
  
  /* Make stats more compact */
  .stat-value {
    font-size: 2rem;
  }
  
  /* Improve button spacing */
  .btn-primary, .btn-secondary {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  /* Stack form elements */
  form .grid {
    gap: 0.75rem;
  }
  
  /* Make tables horizontally scrollable */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Improve touch targets */
  button, a, input, select, textarea {
    min-height: 44px;
  }
  
  /* Better spacing for mobile */
  main {
    padding: 1rem !important;
  }
}

/* Improve focus states for accessibility */
button:focus, a:focus, input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--threadline-teal);
  outline-offset: 2px;
}

/* Ensure modal is mobile-friendly */
@media (max-width: 640px) {
  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
}
