/* ============================================
   Demo Spec Page Specific Styles - Specifys.ai
   ============================================
   Styles specific to the demo-spec.html page
   These styles were moved from inline <style> tag to improve maintainability
*/

/* Fix header display - using higher specificity instead of !important */
.demo-spec-page .thematic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  min-height: 60px;
  padding: 15px 20px;
}

.demo-spec-page .main-content {
  padding-top: 70px;
}

/* Alternative: if demo-spec-page class is not available, use body specificity */
body:has(.demo-header) .thematic-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  min-height: 60px;
  padding: 15px 20px;
}

body:has(.demo-header) .main-content {
  padding-top: 70px;
}

/* Spec Display Styles */
.spec-tabs {
  display: flex;
  gap: 8px;
  margin: 30px 0;
  padding: 8px;
  background: linear-gradient(to right, #f8f9fa 0%, #f5f5f5 100%);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  flex-wrap: wrap;
  justify-content: center;
}

.spec-tab {
  padding: 14px 28px;
  background: transparent;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 15px;
  color: #555;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--body-font);
  position: relative;
  min-width: 120px;
  text-align: center;
  white-space: nowrap;
}

.spec-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #FF6B35 0%, #FF8551 100%);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.spec-tab:hover::before {
  opacity: 0.1;
}

.spec-tab:hover {
  color: #FF6B35;
  transform: translateY(-2px);
}

.spec-tab.active {
  color: white;
  background: linear-gradient(135deg, #FF6B35 0%, #FF8551 100%);
  border-color: #FF6B35;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
  transform: translateY(-2px);
}

.spec-tab.active::before {
  opacity: 0;
}

.spec-content {
  display: none;
}

.spec-content.active {
  display: block;
}

/* Demo Header Enhancement */
.demo-header {
  background: linear-gradient(135deg, #fff9f5 0%, #ffffff 100%);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid #FFE8DC;
  position: relative;
  overflow: hidden;
}

.demo-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #FF6B35 0%, #FF8551 100%);
}

.demo-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  background: linear-gradient(135deg, #FF6B35 0%, #FF8551 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
  line-height: 1.2;
}

.demo-header p {
  font-size: 1.1rem;
  color: #666;
  text-align: center;
  margin: 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.loading-content {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.loading-spinner {
  font-size: 48px;
  color: #FF6B35;
  margin-bottom: 20px;
  display: block;
}

/* Chat Styles */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 600px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f9f9f9;
}

.chat-message {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.chat-message.user {
  align-items: flex-end;
}

.chat-message.assistant {
  align-items: flex-start;
}

.chat-message-bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 8px;
  word-wrap: break-word;
}

.chat-message.user .chat-message-bubble {
  background: white;
  color: #333;
  border: 1px solid #ff6b35;
}

.chat-message.assistant .chat-message-bubble {
  background: white;
  color: #333;
  border: 1px solid #ddd;
}

.chat-input-container {
  display: flex;
  padding: 15px;
  background: white;
  border-top: 1px solid #e0e0e0;
  gap: 10px;
}

.chat-input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.chat-send-btn {
  padding: 12px 24px;
  background: #FF6B35;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.chat-send-btn:hover {
  background: #FF8551;
}

.chat-welcome {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.chat-welcome i {
  font-size: 48px;
  color: #FF6B35;
  margin-bottom: 15px;
  display: block;
}

.demo-notice {
  background: #FFF9E6;
  border: 1px solid #FFD700;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  color: #856404;
}

.demo-notice i {
  color: #FFD700;
  margin-right: 8px;
}

/* Content Section Styles - Reset and enhanced */
.spec-content {
  font-size: 16px;
  line-height: 1.8;
  max-width: 1200px;
  margin: 0 auto;
}

.content-section {
  margin-bottom: 40px;
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.content-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #333;
  border-bottom: 3px solid #FF6B35;
  padding-bottom: 10px;
}

.content-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #444;
}

.content-section h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #555;
}

.content-section p {
  margin-bottom: 16px;
  color: #666;
  line-height: 1.8;
}

.content-section ul,
.content-section ol {
  margin-bottom: 20px;
  padding-left: 30px;
}

.content-section li {
  margin-bottom: 10px;
  line-height: 1.7;
  color: #666;
}

.content-section code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  color: #e83e8c;
}

.content-section pre {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 20px 0;
  font-family: 'Monaco', 'Courier New', monospace;
}

.content-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 16px;
}

.content-section table th {
  background: #f5f5f5;
  padding: 15px;
  border: 1px solid #ddd;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}

.content-section table td {
  padding: 15px;
  border: 1px solid #ddd;
}

/* Chart container */
.chart-container {
  position: relative;
  height: 400px;
  margin: 30px 0;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Stat Cards */
.stat-card {
  padding: 25px;
  border-radius: 12px;
  color: white;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
}

.stat-card h4 {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 600;
  opacity: 0.9;
  color: white !important;
}

.stat-card .stat-value {
  font-size: 36px;
  font-weight: bold;
  margin: 10px 0;
  color: white !important;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.feature-card {
  background: #f9f9f9;
  padding: 25px;
  border-radius: 10px;
  border-left: 4px solid #6366F1;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
  background: white;
}

.feature-card h4 {
  color: #333;
  margin-bottom: 10px;
  font-weight: 600;
}

/* Comparison Table */
.comparison-table {
  overflow-x: auto;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-section {
  animation: fadeInUp 0.5s ease-out;
}
