/* UneeQ Kiosk Documentation Theme */

:root {
  /* UneeQ Brand Colors - From DigitalHumans.com and Logo Analysis */
  --uneeq-primary: #E91E63;     /* Deep magenta from logo (accent) */
  --uneeq-primary-light: #FF7F7F; /* Light coral from logo (accent) */
  --uneeq-secondary: #e96057;   /* Brand red/orange from digitalhumans.com */
  --uneeq-secondary-light: #FFA726; /* Light orange from logo */
  --uneeq-dark-navy: #0B0941;  /* Primary dark from digitalhumans.com */
  --uneeq-accent-purple: #5F56D9; /* Accent purple from digitalhumans.com */
  --uneeq-dark-bg: #0e0b33;    /* Dark background from digitalhumans.com */
  --uneeq-dark: #2C3E50;       /* Secondary dark navy */
  --uneeq-dark-light: #34495E; /* Lighter navy */
  --uneeq-light: #FFFFFF;      /* Clean white */
  --uneeq-light-gray: #F8F9FA; /* Very light gray */
  --uneeq-gray: #6C757D;       /* Medium gray */

  /* Alert Colors */
  --success-color: #28A745;
  --warning-color: #FFC107;
  --error-color: #DC3545;
  --info-color: var(--uneeq-primary);

  /* Dark Mode Colors - Desaturated for Better Eye Comfort */
  --dark-bg-primary: #0e0b33;
  --dark-bg-secondary: #1a1747;
  --dark-text-primary: #F8F9FA; /* Off-white instead of pure white */
  --dark-text-secondary: #B0B7C3;
  --dark-border: #2a2550;

  /* Desaturated Purple/Navy for Dark Mode (20 points less saturation) */
  --uneeq-accent-purple-dark: #6B64D6; /* Slightly lighter and less saturated */
  --uneeq-dark-navy-dark: #1A1555; /* Lighter version of dark navy */
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--uneeq-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--uneeq-light);
  font-size: 16px;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header - Light Mode: Pink/Orange Gradient with High Contrast White Text */
.header {
  background: linear-gradient(135deg, #5F56D9 0%, #8B5FF8 25%, #B84BF5 50%, #E537E8 75%, #F41788 100%);
  color: white;
  padding: 1rem 0;
  margin-bottom: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  height: 40px;
  width: 40px;
  flex-shrink: 0;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: white !important;
  letter-spacing: -0.025em;
}

.header .subtitle {
  font-size: 0.875rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
}

/* Navigation - Light Mode: Pink Border */
.nav {
  background: var(--uneeq-light);
  border-bottom: 3px solid var(--uneeq-primary);
  margin-bottom: 2rem;
  position: sticky;
  top: 80px;
  z-index: 90;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0;
  margin: 0;
  padding: 0;
}

.nav-link {
  flex: 1;
}

.nav-link a {
  display: block;
  padding: 1rem 2rem;
  text-decoration: none;
  color: var(--uneeq-dark);
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

/* Navigation Active/Hover - Light Mode: Pink/Orange Gradient */
.nav-link a:hover,
.nav-link.active a {
  background: linear-gradient(135deg, var(--uneeq-primary-light), var(--uneeq-primary));
  color: var(--uneeq-light);
  border-bottom-color: var(--uneeq-secondary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Typography - Light Mode: Pink for Main Headers, Dark for Body */
h1 { font-size: 2.5rem; color: var(--uneeq-primary); }
h2 { font-size: 2rem; color: var(--uneeq-dark); }
h3 { font-size: 1.5rem; color: var(--uneeq-dark); }
h4 { font-size: 1.25rem; color: var(--uneeq-dark); }

p {
  margin-bottom: 1.5rem;
}

/* Step Container - Light Mode: Pink Border and Shadow */
.step-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0 1.5rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--uneeq-light-gray) 0%, var(--uneeq-light) 100%);
  border-radius: 12px;
  border-left: 4px solid var(--uneeq-primary);
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.1);
}

/* Step Number - Light Mode: Pink/Orange Gradient */
.step-number {
  background: linear-gradient(135deg, var(--uneeq-primary), var(--uneeq-secondary));
  color: var(--uneeq-light);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.step-content {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--uneeq-dark);
}

/* Alert Boxes (from template) */
.alert-box {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 12px;
  border-left: 4px solid;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.alert-box svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* Alert Info - Light Mode: Pink Background */
.alert-info {
  background: linear-gradient(135deg, rgba(233, 30, 99, 0.1) 0%, rgba(233, 30, 99, 0.05) 100%);
  border-left-color: var(--info-color);
  color: var(--uneeq-dark);
}

.alert-info svg {
  color: var(--info-color);
}

.alert-success {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
  border-left-color: var(--success-color);
  color: var(--uneeq-dark);
}

.alert-success svg {
  color: var(--success-color);
}

.alert-warning {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
  border-left-color: var(--warning-color);
  color: var(--uneeq-dark);
}

.alert-warning svg {
  color: var(--warning-color);
}

.alert-error {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.05) 100%);
  border-left-color: var(--error-color);
  color: var(--uneeq-dark);
}

.alert-error svg {
  color: var(--error-color);
}

/* Code Blocks */
pre, code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9rem;
}

code {
  background: var(--uneeq-light-gray);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  color: var(--uneeq-secondary);
  font-weight: 500;
}

pre {
  background: var(--uneeq-dark);
  color: var(--uneeq-light);
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.code-block {
  background: var(--uneeq-dark);
  color: var(--uneeq-light);
  padding: 1rem;
  border-radius: 6px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  margin: 1rem 0;
}

/* Links - Light Mode: Pink */
a {
  color: var(--uneeq-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

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

/* Cards */
.card {
  background: var(--uneeq-light);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  border: 1px solid rgba(233, 30, 99, 0.1);
}

/* Card Headers - Light Mode: Pink */
.card h3 {
  color: var(--uneeq-primary);
  margin-bottom: 1rem;
}

/* Grid System */
.grid {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
}

.grid-2 {
  grid-template-columns: 1fr 1fr;
}

.grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}

/* Table Styling - Light Mode: Pink Theme */
th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(233, 30, 99, 0.1);
}

th {
  background: linear-gradient(135deg, var(--uneeq-primary), var(--uneeq-secondary));
  color: var(--uneeq-light);
  font-weight: 600;
}

tr:nth-child(even) {
  background: rgba(233, 30, 99, 0.05);
}

/* Footer */
.footer {
  background: var(--uneeq-dark);
  color: var(--uneeq-light);
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer p {
  margin: 0;
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .header-left {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .logo-icon {
    width: 60px;
    height: 60px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .nav-links {
    flex-direction: column;
  }

  .step-container {
    flex-direction: column;
    text-align: center;
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 12px;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0 !important; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* Dark Mode Toggle Button */
.dark-mode-toggle {
  position: fixed;
  top: 20px;
  right: max(16px, calc((100vw - 1200px) / 2 + 16px));
  z-index: 1000;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.dark-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dark-mode-toggle:active {
  transform: translateY(0);
}

/* Dark Mode Styles - Override Color Variables */
[data-theme="dark"] {
  --uneeq-light: var(--dark-bg-primary);
  --uneeq-light-gray: var(--dark-bg-secondary);
  --uneeq-dark: var(--dark-text-primary);
  --uneeq-dark-light: var(--dark-text-secondary);
  --uneeq-gray: #8B92A5;
}

/* Dark Mode Text Color Override */
[data-theme="dark"] * {
  color: var(--dark-text-primary);
}

/* Dark Mode Background Elements Keep Their Background Colors */
[data-theme="dark"] .header,
[data-theme="dark"] .nav,
[data-theme="dark"] .card,
[data-theme="dark"] .step-container,
[data-theme="dark"] .alert-box,
[data-theme="dark"] pre,
[data-theme="dark"] code,
[data-theme="dark"] .footer {
  color: var(--dark-text-primary);
}

/* Dark Mode Body Text: Ensure Proper Off-White Color */
[data-theme="dark"] body {
  background-color: var(--dark-bg-primary);
  color: var(--dark-text-primary);
}

[data-theme="dark"] p,
[data-theme="dark"] li,
[data-theme="dark"] td,
[data-theme="dark"] .step-content {
  color: var(--dark-text-primary) !important;
}

/* Dark Mode Header: Desaturated Purple/Navy Gradient for Eye Comfort */
[data-theme="dark"] .header {
  background: linear-gradient(135deg, #4338CA 0%, #6366F1 25%, #7C3AED 50%, #8B5CF6 75%, #A855F7 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .header h1 {
  color: white !important;
}

[data-theme="dark"] .header .subtitle {
  color: rgba(255, 255, 255, 0.8) !important;
}

[data-theme="dark"] .header-text {
  color: white !important;
}

/* Dark Mode Navigation: Purple Theme */
[data-theme="dark"] .nav {
  background: var(--dark-bg-secondary);
  border-bottom-color: var(--uneeq-accent-purple);
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

[data-theme="dark"] .nav-link a {
  color: var(--dark-text-primary);
}

[data-theme="dark"] .nav-link a:hover,
[data-theme="dark"] .nav-link.active a {
  background: linear-gradient(135deg, var(--uneeq-accent-purple-dark), var(--uneeq-dark-navy-dark));
  color: var(--uneeq-light);
}

[data-theme="dark"] .card {
  background: var(--dark-bg-secondary);
  border-color: var(--dark-border);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

[data-theme="dark"] .step-container {
  background: linear-gradient(135deg, var(--dark-bg-secondary) 0%, #1a1747 100%);
  border-left-color: var(--uneeq-accent-purple);
}

[data-theme="dark"] .alert-box {
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

[data-theme="dark"] .alert-info {
  background: linear-gradient(135deg, rgba(95, 86, 217, 0.2) 0%, rgba(95, 86, 217, 0.1) 100%);
  color: var(--dark-text-primary);
}

[data-theme="dark"] .alert-success {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.2) 0%, rgba(40, 167, 69, 0.1) 100%);
  color: var(--dark-text-primary);
}

[data-theme="dark"] .alert-warning {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, rgba(255, 193, 7, 0.1) 100%);
  color: var(--dark-text-primary);
}

[data-theme="dark"] .alert-error {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.2) 0%, rgba(220, 53, 69, 0.1) 100%);
  color: var(--dark-text-primary);
}

[data-theme="dark"] code {
  background: #2a2550;
  color: var(--uneeq-secondary);
}

[data-theme="dark"] pre {
  background: #1a1530;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

[data-theme="dark"] .code-block {
  background: #1a1530;
}

[data-theme="dark"] table {
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

[data-theme="dark"] th,
[data-theme="dark"] td {
  border-bottom-color: var(--dark-border);
}

[data-theme="dark"] tr:nth-child(even) {
  background: rgba(95, 86, 217, 0.1);
}

[data-theme="dark"] .footer {
  background: #0a0825;
}

/* Dark Mode Typography: Heavier Weights to Reduce Halation */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: var(--dark-text-primary);
  font-weight: 700; /* Slightly heavier for dark mode */
  letter-spacing: 0.025em; /* Increased letter spacing for better clarity */
}

[data-theme="dark"] h1 {
  color: var(--uneeq-accent-purple-dark);
}

[data-theme="dark"] .card h3 {
  color: var(--uneeq-accent-purple-dark);
}

/* Dark mode toggle icon states */
.dark-mode-toggle .sun-icon {
  display: none;
}

.dark-mode-toggle .moon-icon {
  display: block;
}

[data-theme="dark"] .dark-mode-toggle .sun-icon {
  display: block;
}

[data-theme="dark"] .dark-mode-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .dark-mode-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .dark-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* Loading Animation for Development */
@keyframes uneeq-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: uneeq-pulse 2s infinite;
}

/* GitLab Repository Link */
.gitlab-repo-link {
  position: fixed;
  top: 20px;
  right: max(76px, calc((100vw - 1200px) / 2 + 76px)); /* Position to left of dark mode toggle */
  z-index: 999;
  background: var(--uneeq-primary);
  color: var(--uneeq-light);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(95, 86, 217, 0.3);
  transition: all 0.3s ease;
}

.gitlab-repo-link:hover {
  background: var(--uneeq-secondary);
  box-shadow: 0 6px 20px rgba(95, 86, 217, 0.4);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--uneeq-light);
}

.gitlab-repo-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

[data-theme="dark"] .gitlab-repo-link {
  background: var(--uneeq-accent-purple-dark);
  box-shadow: 0 4px 15px rgba(107, 100, 214, 0.3);
}

[data-theme="dark"] .gitlab-repo-link:hover {
  background: var(--uneeq-primary);
  box-shadow: 0 6px 20px rgba(107, 100, 214, 0.4);
}

/* Mobile responsive adjustments for repository links */
@media (max-width: 768px) {
  .gitlab-repo-link {
    top: 80px; /* Move below header on mobile */
    right: 16px;
    font-size: 13px;
    padding: 6px 10px;
  }

  .gitlab-repo-link svg {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 480px) {
  .gitlab-repo-link {
    position: relative;
    top: auto;
    right: auto;
    margin: 10px auto;
    display: inline-flex;
    width: fit-content;
  }
}

/* System Architecture Diagram Styling */
.architecture-container {
  width: 100%;
  margin: 2rem 0;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(95, 86, 217, 0.2);
  border-radius: 8px;
  text-align: center;
}

.architecture-diagram-img {
  width: calc(100% - 0.5rem);
  height: auto;
  margin: 0.25rem;
  border-radius: 4px;
  display: block;
}

[data-theme="dark"] .architecture-container {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(139, 92, 246, 0.3);
}

/* SVG Dark Mode Support via CSS Custom Properties */
[data-theme="dark"] .architecture-diagram-img {
  --svg-bg: #1e293b;
  --svg-title: #f1f5f9;
  --svg-section: #cbd5e1;
  --svg-arrow: #94a3b8;
  --svg-connection: #94a3b8;
  --svg-label: #94a3b8;

  /* Dark mode user layer */
  --user-kiosk-bg: #1e3a8a;
  --user-kiosk-border: #60a5fa;
  --user-kiosk-text: #bfdbfe;
  --user-mobile-bg: #581c87;
  --user-mobile-border: #a78bfa;
  --user-mobile-text: #e9d5ff;

  /* Dark mode frontend layer */
  --frontend-bg: #064e3b;
  --frontend-border: #34d399;
  --frontend-text: #a7f3d0;
  --frontend-comp-bg: #065f46;
  --frontend-comp-border: #10b981;
  --frontend-comp-text: #6ee7b7;

  /* Dark mode state management */
  --state-bg: #92400e;
  --state-border: #fbbf24;
  --state-text: #fde68a;

  /* Dark mode backend layer */
  --backend-bg: #7f1d1d;
  --backend-border: #f87171;
  --backend-text: #fecaca;

  /* Dark mode external services */
  --external-bg: #0c4a6e;
  --external-border: #0ea5e9;
  --external-text: #bae6fd;
  --platform-bg: #881337;
  --platform-border: #f43f5e;
  --platform-text: #fda4af;
}

/* Responsive diagram sizing */
@media (max-width: 768px) {
  .architecture-container {
    padding: 0.25rem;
  }

  .architecture-diagram-img {
    width: calc(100% - 0.5rem);
    height: auto;
    margin: 0.25rem;
  }
}

