/* ElevatorTech.ai - Main Stylesheet
   A professional, technical design for elevator industry professionals */

/* Base styles and variables */
:root {
  --primary-color: #1a3b5c;     /* Deep blue */
  --secondary-color: #e36c0a;   /* Industrial orange */
  --accent-color: #17a2b8;      /* Teal accent */
  --light-color: #f8f9fa;       /* Light background */
  --dark-color: #343a40;        /* Dark text/background */
  --success-color: #28a745;     /* Success green */
  --warning-color: #ffc107;     /* Warning yellow */
  --danger-color: #dc3545;      /* Danger red */
  --info-color: #17a2b8;        /* Info blue */
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  
  --font-family-sans-serif: 'Roboto', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family-monospace: 'Roboto Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --border-radius: 0.25rem;
  --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Global styles */
body {
  font-family: var(--font-family-sans-serif);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-100);
  margin: 0;
  padding: 0;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

/* Technical content formatting */
.technical-text {
  font-family: var(--font-family-sans-serif);
  line-height: 1.6;
}

.code-block {
  font-family: var(--font-family-monospace);
  background-color: var(--gray-200);
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1rem;
  overflow-x: auto;
}

/* Header & Navigation */
.navbar {
  background-color: var(--primary-color);
  padding: 0.75rem 1rem;
  box-shadow: var(--box-shadow);
}

.navbar-brand {
  font-size: 1.5rem;
  color: white !important;
  font-weight: 500;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: rgba(255, 255, 255, 1);
}

.navbar-dark .navbar-nav .active > .nav-link {
  color: white;
  font-weight: 500;
}

/* Search bar */
.search-bar {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  border: 2px solid var(--gray-300);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  width: 100%;
  font-size: 1rem;
  transition: border-color 0.2s ease-in-out;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Cards and containers */
.card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  border: 1px solid var(--gray-300);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.card-header {
  background-color: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid var(--gray-300);
  padding: 1rem;
  font-weight: 500;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background-color: rgba(0, 0, 0, 0.03);
  border-top: 1px solid var(--gray-300);
  padding: 1rem;
}

/* Manufacturer and model listings */
.manufacturer-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.manufacturer-card {
  flex: 1 1 300px;
  max-width: 400px;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.manufacturer-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.model-list {
  list-style-type: none;
  padding-left: 0;
}

.model-item {
  padding: 0.75rem;
  border-bottom: 1px solid var(--gray-300);
}

.model-item:last-child {
  border-bottom: none;
}

/* Specification tables */
.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table th,
.specs-table td {
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
}

.specs-table th {
  background-color: var(--gray-200);
  text-align: left;
  font-weight: 500;
}

/* Documentation viewer */
.doc-viewer {
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  max-width: 1200px;
  margin: 0 auto;
}

.doc-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-300);
}

/* Schematic viewer */
.schematic-container {
  background-color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  max-width: 1200px;
  margin: 0 auto;
  overflow: auto;
}

.schematic-image {
  max-width: 100%;
  height: auto;
}

.schematic-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

/* AI Assistant */
.ai-assistant-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 500px;
}

.chat-container {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background-color: white;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  border: 1px solid var(--gray-300);
}

.chat-input-container {
  padding: 1rem;
  background-color: white;
  border: 1px solid var(--gray-300);
  border-top: none;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.chat-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-size: 1rem;
}

.message {
  margin-bottom: 1.5rem;
  max-width: 80%;
}

.message-user {
  margin-left: auto;
  background-color: var(--primary-color);
  color: white;
  border-radius: 1rem 1rem 0 1rem;
  padding: 0.75rem 1rem;
}

.message-ai {
  margin-right: auto;
  background-color: var(--gray-200);
  border-radius: 1rem 1rem 1rem 0;
  padding: 0.75rem 1rem;
}

.citations {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-600);
}

.citation-link {
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
  padding: 0.25rem 0.5rem;
  background-color: var(--gray-200);
  border-radius: var(--border-radius);
  font-size: 0.75rem;
  color: var(--gray-700);
  text-decoration: none;
}

.citation-link:hover {
  background-color: var(--gray-300);
  text-decoration: none;
}

/* Footer */
.footer {
  background-color: var(--gray-800);
  color: white;
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer a {
  color: var(--gray-300);
}

.footer a:hover {
  color: white;
}

/* Utility classes */
.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-secondary {
  background-color: var(--secondary-color) !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

.text-secondary {
  color: var(--secondary-color) !important;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #14304f;
  border-color: #14304f;
}

.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: #c35c08;
  border-color: #c35c08;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .manufacturer-card {
    flex: 1 1 100%;
    max-width: 100%;
  }
  
  .message {
    max-width: 90%;
  }
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .doc-viewer {
    padding: 1rem;
  }
  
  .message {
    max-width: 95%;
  }
}

/* Print styles */
@media print {
  .navbar, .footer, .chat-input-container, .schematic-controls {
    display: none;
  }
  
  .container {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
  }
  
  .card {
    border: none;
    box-shadow: none;
  }
  
  body {
    background-color: white;
    font-size: 12pt;
  }
  
  a {
    text-decoration: none;
    color: var(--gray-800);
  }
  
  .doc-viewer, .schematic-container {
    box-shadow: none;
    max-width: 100%;
  }
}
