/* SMS-iT Workflow Documentation - Modern Design */
:root {
  --primary-blue: #149fd6;
  --primary-blue-dark: #0b4a66;
  --primary-blue-light: #2eb8e5;
  --white: #ffffff;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f4;
  --gray-200: #e8eaed;
  --gray-700: #5f6368;
  --gray-800: #3c4043;
  --gray-900: #202124;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font-primary);
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --z-fixed: 1030;
  --z-sticky: 1020;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.docs-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  z-index: var(--z-fixed);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--space-6);
  overflow: visible;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--gray-900);
  font-weight: 700;
  font-size: var(--text-lg);
  min-width: 300px;
  max-width: none;
  width: auto;
  overflow: visible;
  white-space: nowrap;
}

.brand-icon {
  font-size: var(--text-2xl);
  color: var(--primary-blue);
}

.brand-text {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
}

.brand-subtitle {
  font-size: var(--text-sm);
  color: var(--gray-700);
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.docs-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 70px;
}

.docs-sidebar {
  width: 280px;
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  position: fixed;
  top: 70px;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: var(--z-sticky);
}

.sidebar-content {
  padding: var(--space-6);
  max-width: 100%;
  overflow-x: hidden;
}

.nav-section {
  margin-bottom: var(--space-8);
}

.nav-section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gray-900);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
  padding: 0 var(--space-3);
}

.nav-list {
  list-style: none;
}

.nav-item {
  margin-bottom: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  color: var(--gray-700);
  text-decoration: none;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.nav-link:hover {
  background: var(--gray-50);
  color: var(--primary-blue);
}

.nav-link i {
  font-size: var(--text-sm);
  width: 16px;
  text-align: center;
}

.docs-main {
  flex: 1;
  margin-left: 280px;
  min-height: calc(100vh - 70px);
}

.docs-content {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-6);
}

h2 {
  font-size: var(--text-3xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--gray-100);
}

h3 {
  font-size: var(--text-2xl);
  margin-top: var(--space-6);
}

p {
  margin-bottom: var(--space-4);
  color: var(--gray-700);
  line-height: 1.7;
}

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-blue-dark);
  text-decoration: underline;
}

ul, ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

li {
  margin-bottom: var(--space-2);
  color: var(--gray-700);
  line-height: 1.6;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin: var(--space-6) 0;
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.card-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: var(--text-lg);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}

/* Additional content styling for imported n8n content */
.docs-content pre,
.docs-main pre {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin: var(--space-4) 0;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.docs-content code,
.docs-main code {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9em;
  color: var(--gray-800);
}

.docs-content pre code,
.docs-main pre code {
  background: none;
  padding: 0;
}

.docs-content blockquote,
.docs-main blockquote {
  border-left: 4px solid var(--primary-blue);
  background: var(--gray-50);
  padding: var(--space-4);
  margin: var(--space-4) 0;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.docs-content table,
.docs-main table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.docs-content th,
.docs-main th {
  background: var(--gray-100);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 600;
  color: var(--gray-900);
  border-bottom: 1px solid var(--gray-200);
}

.docs-content td,
.docs-main td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-700);
}

.docs-content tr:last-child td,
.docs-main tr:last-child td {
  border-bottom: none;
}

.docs-content img,
.docs-main img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: var(--space-4) 0;
  box-shadow: var(--shadow-md);
}

.docs-content .admonition,
.docs-main .admonition,
.docs-content .note,
.docs-main .note,
.docs-content .warning,
.docs-main .warning,
.docs-content .tip,
.docs-main .tip {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--primary-blue);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin: var(--space-4) 0;
}

.docs-content .warning,
.docs-main .warning {
  border-left-color: #f59e0b;
  background: #fef3c7;
}

.docs-content .note,
.docs-main .note {
  border-left-color: var(--primary-blue);
  background: #dbeafe;
}

.docs-content .tip,
.docs-main .tip {
  border-left-color: #10b981;
  background: #d1fae5;
}

/* Navigation tree styling for content */
.docs-content .toctree-wrapper,
.docs-main .toctree-wrapper,
.docs-content .compound,
.docs-main .compound {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin: var(--space-6) 0;
}

.docs-content .toctree-wrapper ul,
.docs-main .toctree-wrapper ul,
.docs-content .compound ul,
.docs-main .compound ul {
  list-style: none;
  padding-left: 0;
}

.docs-content .toctree-wrapper li,
.docs-main .toctree-wrapper li,
.docs-content .compound li,
.docs-main .compound li {
  margin: var(--space-2) 0;
  padding-left: var(--space-4);
  position: relative;
}

.docs-content .toctree-wrapper li:before,
.docs-main .toctree-wrapper li:before,
.docs-content .compound li:before,
.docs-main .compound li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-blue);
  font-weight: bold;
}

.docs-content .toctree-wrapper a,
.docs-main .toctree-wrapper a,
.docs-content .compound a,
.docs-main .compound a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
}

.docs-content .toctree-wrapper a:hover,
.docs-main .toctree-wrapper a:hover,
.docs-content .compound a:hover,
.docs-main .compound a:hover {
  text-decoration: underline;
}

/* Checkbox styling for content */
.docs-content input[type="checkbox"],
.docs-main input[type="checkbox"] {
  margin-right: var(--space-2);
  transform: scale(1.2);
}

/* Definition lists */
.docs-content dl,
.docs-main dl {
  margin: var(--space-4) 0;
}

.docs-content dt,
.docs-main dt {
  font-weight: 600;
  color: var(--gray-900);
  margin-top: var(--space-3);
}

.docs-content dd,
.docs-main dd {
  margin-left: var(--space-4);
  margin-bottom: var(--space-2);
  color: var(--gray-700);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .docs-sidebar {
    transform: translateX(-100%);
  }
  
  .docs-main {
    margin-left: 0;
  }
  
  .docs-content {
    padding: var(--space-4);
  }
  
  .header-container {
    padding: 0 var(--space-4);
  }
}


/* ===== NAVIGATION UX IMPROVEMENTS ===== */

/* Breadcrumb Navigation */
.breadcrumb-nav {
    margin: 0 0 20px 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color, #007bff);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #6c757d;
}

.breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: #adb5bd;
    font-weight: bold;
}

.breadcrumb-link {
    color: var(--primary-color, #007bff);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-link:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: var(--primary-color-dark, #0056b3);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #495057;
    font-weight: 500;
}

/* Enhanced Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.suggestions-title {
    padding: 12px 16px 8px;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f1f3f4;
    background-color: #f8f9fa;
}

.suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f4;
    color: #495057;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color, #007bff);
    padding-left: 20px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Improved Navigation Sections */
.nav-section {
    margin-bottom: 8px;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-section:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.nav-section-title {
    position: relative;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    color: #495057;
}

.nav-section-title:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: var(--primary-color, #007bff);
    transform: translateY(-1px);
}

.nav-section-title.active {
    background: linear-gradient(135deg, var(--primary-color, #007bff) 0%, #0056b3 100%);
    color: white;
    border-color: var(--primary-color, #007bff);
}

.nav-chevron {
    transition: transform 0.3s ease;
    font-size: 12px;
    opacity: 0.7;
}

.nav-chevron.expanded {
    transform: rotate(90deg);
}

/* Enhanced Navigation Items */
.nav-subitem {
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.2s ease;
}

.nav-subitem:last-child {
    border-bottom: none;
}

.nav-subitem:hover {
    background-color: #f8f9fa;
    transform: translateX(4px);
}

.nav-sublink {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 10px;
    position: relative;
}

.nav-sublink:hover {
    color: var(--primary-color, #007bff);
    text-decoration: none;
    padding-left: 24px;
}

.nav-sublink.active {
    background: linear-gradient(90deg, rgba(0, 123, 255, 0.1) 0%, transparent 100%);
    color: var(--primary-color, #007bff);
    font-weight: 500;
    border-left: 3px solid var(--primary-color, #007bff);
}

.nav-sublink i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.nav-sublink:hover i,
.nav-sublink.active i {
    opacity: 1;
    transform: scale(1.1);
}

/* Mobile Menu Improvements */
@media (max-width: 768px) {
    .breadcrumb-nav {
        margin: 0 0 15px 0;
        padding: 8px 12px;
    }
    
    .breadcrumb-list {
        font-size: 12px;
        gap: 4px;
    }
    
    .breadcrumb-item:not(:last-child)::after {
        margin-left: 4px;
    }
    
    .search-suggestions {
        max-height: 200px;
    }
    
    .nav-section-title {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .nav-sublink {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Keyboard Navigation Indicators */
.keyboard-focus {
    outline: 2px solid var(--primary-color, #007bff);
    outline-offset: 2px;
}

/* Loading States */
.nav-loading {
    opacity: 0.6;
    pointer-events: none;
}

.nav-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 16px;
    height: 16px;
    border: 2px solid #dee2e6;
    border-top: 2px solid var(--primary-color, #007bff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translateY(-50%);
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Management */
.nav-section-title:focus,
.nav-sublink:focus,
.breadcrumb-link:focus {
    outline: 2px solid var(--primary-color, #007bff);
    outline-offset: 2px;
}

/* Smooth Scrolling for Navigation */
.docs-sidebar {
    scroll-behavior: smooth;
}

/* Enhanced Visual Hierarchy */
.nav-section[data-priority="high"] .nav-section-title {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffc107;
}

.nav-section[data-priority="high"] .nav-section-title:hover {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
}

/* Integration Category Styling */
.nav-sublink[href*="communication"] i { color: #28a745; }
.nav-sublink[href*="crm"] i { color: #007bff; }
.nav-sublink[href*="productivity"] i { color: #ffc107; }
.nav-sublink[href*="cloud-storage"] i { color: #17a2b8; }
.nav-sublink[href*="databases"] i { color: #6f42c1; }
.nav-sublink[href*="marketing"] i { color: #fd7e14; }
.nav-sublink[href*="social-media"] i { color: #e83e8c; }
.nav-sublink[href*="ecommerce"] i { color: #20c997; }

/* ===== END NAVIGATION UX IMPROVEMENTS ===== */

/* ===== ENHANCED FONT SIZES FOR NAVIGATION ===== */

/* Increase font sizes for the enhanced navigation sections */

/* Popular Integrations section */
.featured-integrations-enhanced .featured-header-enhanced {
    font-size: 16px !important; /* Increased from 14px */
}

.featured-integrations-enhanced .nav-sublink-enhanced span {
    font-size: 15px !important; /* Increased from 13px */
}

.featured-integrations-enhanced .nav-sublink-enhanced div {
    font-size: 12px !important; /* Increased from 10px */
}

/* Browse by Category section */
.category-browser-enhanced .category-header-enhanced {
    font-size: 15px !important; /* Increased from 13px */
}

.category-browser-enhanced .nav-sublink-enhanced span {
    font-size: 15px !important; /* Increased from 11px */
}

/* General navigation links */
.nav-link {
    font-size: 15px !important; /* Increase main navigation font size */
}

.nav-sub-link {
    font-size: 14px !important; /* Increase sub-navigation font size */
}

.nav-sub-sub-link {
    font-size: 13px !important; /* Increase sub-sub-navigation font size */
}

/* Section titles */
.nav-section-title {
    font-size: 16px !important; /* Increase section title font size */
}

/* Search input */
.search-input {
    font-size: 14px !important; /* Increase search input font size */
}

/* ===== END ENHANCED FONT SIZES FOR NAVIGATION ===== */

/* ===== HORIZONTAL SCROLL FIX ===== */

/* Prevent horizontal overflow in sidebar */
.docs-sidebar * {
  max-width: 100%;
  box-sizing: border-box;
}

/* Fix navigation container overflow */
.nav-item,
.nav-sub-item,
.nav-sub-sub-item,
.nav-sub-sub-sub-item {
  max-width: 100%;
  overflow: hidden;
}

/* Fix enhanced navigation sections */
.nav-item.featured-integrations-enhanced,
.nav-item.category-browser-enhanced {
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* Fix enhanced navigation content */
.nav-subitems-enhanced {
  max-width: 100%;
  overflow-x: hidden;
}

.nav-subitem-enhanced {
  max-width: 100%;
  overflow: hidden;
}

.nav-sublink-enhanced {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-sublink-enhanced span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

/* Fix category browser specific overflow */
.category-browser-enhanced .nav-subitems-enhanced {
  max-width: 100%;
  overflow-x: hidden;
}

.category-browser-enhanced .nav-sublink-enhanced {
  min-width: 0;
  flex-wrap: nowrap;
}

/* Fix search container */
.sidebar-search {
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.search-input {
  max-width: 100%;
  box-sizing: border-box;
}

/* Fix navigation links */
.nav-link,
.nav-sub-link,
.nav-sub-sub-link,
.nav-sub-sub-sub-link {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

/* Fix section titles */
.nav-section-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

/* Fix brand link in header */
.brand-link {
  max-width: calc(100% - 200px);
  overflow: hidden;
}

.brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile specific fixes */
@media (max-width: 768px) {
  .docs-sidebar {
    width: 100%;
    max-width: 320px;
    overflow-x: hidden;
  }
  
  .sidebar-content {
    padding: var(--space-4);
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .nav-sublink-enhanced {
    font-size: 12px !important;
  }
  
  .nav-sublink-enhanced span {
    font-size: 12px !important;
  }
  
  .brand-link {
    max-width: calc(100% - 120px);
  }
}

/* Force word wrapping for long text */
.nav-sublink-enhanced span,
.nav-link span,
.nav-section-title span {
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

/* Ensure no element exceeds sidebar width */
.docs-sidebar .nav-section,
.docs-sidebar .nav-list,
.docs-sidebar .nav-item,
.docs-sidebar .nav-link,
.docs-sidebar .nav-subitem-enhanced,
.docs-sidebar .nav-sublink-enhanced {
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* ===== END HORIZONTAL SCROLL FIX ===== */
