:root {
    --sidebar-width: 260px;
    --primary-color: #00A67E;
    --text-color: #1A1A1A;
    --bg-color: #FFFFFF;
    --sidebar-bg: #F8F9FA;
    --card-bg: #FFFFFF;
    --card-border: #d5d5d5;;
    --nav-link-color: #4B5563;
    --nav-hover-color: #00A67E;
}

/* ============================= */
/*        BASE & LAYOUT          */
/* ============================= */

/* All UL BG COLOR SAME AS BODY */  
body.dark-mode #codeTab, #jsonTab, #transientTab, #curlTabs, #limitationsTabs,  #configTabs {
    background-color: #1E1E1E;
}

/* Base Styles */


body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* ============================= */
/*         SIDEBAR               */
/* ============================= */

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    left: 0;
    top: 80px;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--sidebar-bg);
    padding: 20px;
    border-right: 1px solid var(--card-border);
}

.sidebar strong {
    color: var(--text-color);
    font-size: 0.875rem;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

/* ============================= */
/*         MAIN CONTENT          */
/* ============================= */

/* Main Content Styles */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 40px;
    padding-inline: 8rem;
    /* max-width: 80rem; */
    margin-top: 80px;
}

/* ============================= */
/*      NAVIGATION LINKS         */
/* ============================= */

/* Navigation Links */
.nav-link {
    color: var(--nav-link-color);
    padding: 6px 0;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
    display: block;
}

.nav-link:hover {
    color: var(--nav-hover-color);
    text-decoration: none;
}

.nav-link.active {
    color: var(--primary-color);
}

/* ============================= */
/*            CARDS              */
/* ============================= */

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================= */
/*         SEARCH BAR            */
/* ============================= */

/* Search Bar */
.search-bar {
    position: relative;
    margin-left: 10rem;
    margin-top: 1rem;
}

.search-bar input {
    width: 100%;
    padding: 8px 12px;
    padding-left: 36px;
    border: 1px solid var(--card-border);
    border-radius: 6px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* ============================= */
/*      HEADER NAVIGATION        */
/* ============================= */


/* Header Navigation */
.top-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--card-border);
}

.top-nav .nav-item {
    color: var(--nav-link-color);
    text-decoration: none;
    padding: 6px 12px;
    font-size: 0.875rem;
}

.top-nav .nav-item:hover {
    color: var(--nav-hover-color);
}

/* ============================= */
/*          DARK MODE            */
/* ============================= */

/* Dark Mode */
body.dark-mode {
    --bg-color: #0A0A0A;
    --text-color: #FFFFFF;
    --sidebar-bg: #1A1A1A;
    --card-bg: #1A1A1A;
    --card-border: #2D2D2D;
    --nav-link-color: #9CA3AF;
}


/* ============================= */
/*        CUSTOM ELEMENTS        */
/* ============================= */

/* Custom Elements */
.feature-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 24px;
}

.feature-icon {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 16px;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #008F6B;
    border-color: #008F6B;
}

.btn-outline-secondary {
    color: var(--nav-link-color);
    border-color: var(--card-border);
}

.btn-outline-secondary:hover {
    background-color: var(--card-bg);
    color: var(--text-color);
}

.card-group {
    gap: 1.5rem;
}
.card {
    position: relative;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
}
.card-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.external-link-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--nav-link-color);
}
.aically-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}
.aically-badge-assistant {
    background-color: rgba(0, 166, 126, 0.1);
    color: var(--primary-color);
}
.aically-badge-workflow {
    background-color: rgba(79, 70, 229, 0.1);
    color: #4F46E5;
}
.code-block {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

/* ============================= */
/*      PAGE NAVIGATION (TOC)    */
/* ============================= */
/* Page navigation styles */
.page-nav {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 250px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 1.5rem;
}
.page-nav .nav-link {
    color: var(--nav-link-color);
    padding: 0.25rem 0;
    font-size: 0.9rem;
}
.page-nav .nav-link:hover {
    color: var(--primary-color);
}

/* ============================= */
/*      RESPONSIVE DESIGN        */
/* ============================= */

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .top-nav {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .theme-switch {
        position: static;
        margin: 20px 0;
    }
} 

.accordion-item {
    margin-bottom: 0.5rem;
    border-radius: 8px;
}

/* ============================= */
/* TRANSIENT VS PERMANENT CONFIGURATIONS PAGE STYLES */
/* ============================= */

/* ----------------------------- */
/* Transient vs Permanent Configurations Page Styles */
/* ----------------------------- */


/* Tabs Styling (for nav-tabs on transient page) */
.nav-tabs .nav-link {
  color: #ccc;
  border: none;
  background-color: #1e1e1e;
  border-radius: 0;
}

/* --- Tabs Styling for Transient/Permanent Page --- */

.nav-tabs .nav-link.active {
  background-color: transparent;
  color: white;
  border-bottom: 2px solid #00b894;
  font-weight: 600;
}

/* --- Active Tab Styling for Transient/Permanent Page --- */

.tab-content {
  border-radius: 0 0 0.375rem 0.375rem;
  overflow: hidden;
}

/* --- Tab Content Styling for Transient/Permanent Page --- */

/* Tabs for limitations section */
#limitations .nav-tabs .nav-link {
  background-color: transparent;
  color: black !important;
}

/* --- Transient/Permanent Page: Dark Mode Tab/Code/Stepper Fixes --- */
body.dark-mode .nav-tabs .nav-link {
  /* background-color: #23272A !important; */
  color: #B0B3B8 !important;
  border: none;
}
body.dark-mode .nav-tabs .nav-link.active {
  background-color: #181A1B !important;
  color: #00b894 !important;
  border-bottom: 2px solid #00b894;
}

body.dark-mode pre, body.dark-mode code {
  background-color: #181A1B !important;
  color: #F1F1F1 !important;
  border: 1px solid #23272A !important;
}
body.dark-mode .code-header {
  background-color: #23272A !important;
  color: #F1F1F1 !important;
  border-bottom: 1px solid #23272A !important;
}
body.dark-mode .copy-btn {
  color: #B0B3B8 !important;
}
body.dark-mode .card {
  background-color: #181A1B !important;
  border: 1px solid #23272A !important;
  color: #F1F1F1 !important;
}
body.dark-mode .vapi-stepper {
  border-left: 2px solid #23272A !important;
}
body.dark-mode .step-badge {
  background: #23272A !important;
  color: #F1F1F1 !important;
  border: 2px solid #393E46 !important;
}
body.dark-mode .step-title {
  color: #F1F1F1 !important;
}
body.dark-mode .step-desc {
  color: #B0B3B8 !important;
}
body.dark-mode .alert-warning {
  background-color: #23272A !important;
  color: #FFD166 !important;
  border-color: #FFD166 !important;
}

/* --- Dark Mode Table Fixes for Transient/Permanent Page --- */
body.dark-mode table.table,
body.dark-mode .table,
body.dark-mode .table-bordered {
  background-color: #181A1B !important;
  color: #F1F1F1 !important;
  border-color: #23272A !important;
}
body.dark-mode .table thead th,
body.dark-mode .table-bordered thead th {
  background-color: #23272A !important;
  color: #F1F1F1 !important;
  border-color: #23272A !important;
}
body.dark-mode .table tbody td,
body.dark-mode .table-bordered tbody td {
  background-color: #181A1B !important;
  color: #F1F1F1 !important;
  border-color: #23272A !important;
}
body.dark-mode .table-bordered {
  border: 1px solid #23272A !important;
}
body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: #202225 !important;
}

/* --- Dark Mode Styling for Limitations Section --- */

body.dark-mode #limitations .nav-tabs .nav-link {
  color: #B0B3B8 !important;
  border: none;
}
body.dark-mode #limitations .nav-tabs .nav-link.active {
  background-color: #181A1B !important;
  color: #00b894 !important;
  border-bottom: 2px solid #00b894;
}

body.dark-mode #limitations ul {
  background: transparent !important;
  color: #F1F1F1 !important;
}
body.dark-mode #limitations li {
  color: #fff !important;
}

/* --- Dark Mode Styling for Best Practices Section (Accordion) --- */
body.dark-mode #bestPracticesAccordion {
  background-color: #181A1B !important;
  color: #F1F1F1 !important;
  border-radius: 8px;
}
body.dark-mode #bestPracticesAccordion .accordion-item {
  background-color: #23272A !important;
  border: 1px solid #23272A !important;
  color: #F1F1F1 !important;
}
body.dark-mode #bestPracticesAccordion .accordion-header {
  background-color: #23272A !important;
  color: #00b894 !important;
}
body.dark-mode #bestPracticesAccordion .accordion-button {
  background-color: #23272A !important;
  color: #F1F1F1 !important;
  border: none !important;
}
body.dark-mode #bestPracticesAccordion .accordion-button:not(.collapsed) {
  background-color: #181A1B !important;
  color: #00b894 !important;
}
/* --- Always white accordion arrow in dark mode --- */
body.dark-mode .accordion-button::after {
  filter: invert(1) grayscale(1) brightness(2);
}
body.dark-mode #bestPracticesAccordion .accordion-body {
  background-color: #181A1B !important;
  color: #F1F1F1 !important;
}

body.dark-mode .card {
    background-color: var(--card-bg);
    border-color: var(--card-border);
}

body.dark-mode .search-bar input {
    background-color: #1A1A1A;
    border-color: var(--card-border);
    color: #FFFFFF;
}

body.dark-mode .search-bar input::placeholder {
    color: #B0B3B8;
}

body.dark-mode .custom-nav a {
    color: #B0B3B8;
}

/* Make custom sidebar accordion arrow white in dark mode */
body.dark-mode .arrow svg {
    fill: #fff !important;
}


/* --- Limitations Tabs Styling for Transient/Permanent Page --- */

/* Code blocks and code headers */
pre, code {
  background-color: #1e1e1e !important;
  color: #f8f8f2 !important;
  border: none;
  padding: 1rem;
  margin: 0;
  border-radius: 0;
  font-size: 0.875rem;
}

/* --- Code Block Styling for Transient/Permanent Page --- */

.copy-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  color: #ccc;
  cursor: pointer;
}

/* --- Copy Button Styling for Transient/Permanent Page --- */

.code-header {
  position: relative;
  background-color: #1e1e1e;
  border-bottom: 1px solid #2d2d2d;
  padding: 0.5rem 1rem;
  color: #fff;
  font-weight: 500;
}

/* --- Code Header Styling for Transient/Permanent Page --- */

.card {
  background-color: transparent;
  border: none;
}

/* --- Card Styling for Transient/Permanent Page --- */

/* Stepper styles for permanent configuration steps */
.vapi-stepper {
  list-style: none;
  margin: 0;
  padding-left: 0;
  position: relative;
  border-left: 2px solid #e0e0e0;
  margin-left: 15px;
}

/* --- Stepper Styling for Transient/Permanent Page --- */

.vapi-stepper li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 50px;
  position: relative;
  padding-left: 20px;
}

/* --- Stepper List Item Styling for Transient/Permanent Page --- */

.step-badge {
  background: white;
  border: 2px solid #ccc;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  text-align: center;
  font-weight: 600;
  line-height: 24px;
  font-size: 14px;
  position: absolute;
  left: -16px;
  top: 0;
}

/* --- Step Badge Styling for Transient/Permanent Page --- */

.step-badge.icon {
  font-family: monospace;
  font-size: 15px;
  line-height: 24px;
}

/* --- Step Badge Icon Styling for Transient/Permanent Page --- */

.step-title {
  font-weight: 600;
}

/* --- Step Title Styling for Transient/Permanent Page --- */

.step-desc {
  font-size: 0.875rem;
  color: #555;
}

/* --- Step Description Styling for Transient/Permanent Page --- */

.accordion-btn {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    padding: 5px 0px;   
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--nav-link-color);
    font-size: 0.875rem;
    font-weight: normal;
    text-decoration: none;
    transition: color 0.2s;
}


.accordion-btn:hover {
    color: var(--nav-hover-color);
    background: none;
}

.accordion-btn.active {
    color: var(--primary-color);
}


.accordion-content {
    display: none;
    flex-direction: column;
    padding: 0 12px 10px 12px;
    animation: slideDown 0.3s ease-out;
}

.accordion-content a.nav-link {
    padding: 4px 0;
    font-size: 13px;
    color: var(--nav-link-color);
    text-decoration: none;
    transition: color 0.2s;
}


.accordion-content a.nav-link:hover {
    color: var(--nav-hover-color);
}

.accordion-content a.nav-link.active {
    color: var(--primary-color);
}

.arrow {
    transition: transform 0.3s ease;
    font-size: 10px;
}

.accordion-btn.active .arrow {
    transform: rotate(90deg); /* Rotates the arrow */
}

@keyframes slideDown {
from {
    opacity: 0;
    transform: translateY(-4px);
}
to {
    opacity: 1;
    transform: translateY(0);
}
}
.toc-nav {
    display: flex;
    flex-direction: column;
  }
  
  .toc-link {
    color: var(--nav-link-color);
    padding: 4px 0;
    font-size: 0.9rem;
    text-decoration: none;
    border-left: 2px solid transparent;
    padding-left: 10px;
    transition: all 0.2s;
  }
  
  .toc-link:hover {
    color: var(--nav-hover-color);
  }
  
  .toc-link.active {
    color: var(--primary-color);
    border-left: 2px solid var(--primary-color);
    font-weight: 500;
    background-color: transparent;
  }
  
  .toc-sublist {
    padding-left: 15px;
    display: flex;
    flex-direction: column;
  }
  
  .toc-sublist .toc-link {
    font-size: 0.85rem;
    padding-left: 12px;
  }
  
.custom-nav .nav-link {
  padding: 4px 12px;
  color: #333;
  font-size: 14px;
  border-left: 2px solid transparent;
  transition: all 0.2s ease-in-out;
}



.custom-nav .nav-link.active {
  border-left: 2px solid #00a896; /* Green border */
  color: #00a896;
  font-weight: 500;
}

.custom-nav .ps-4 {
  padding-left: 1.75rem !important; /* For nested links */
  font-size: 13.5px;
}

.nav-subgroup {
  display: flex;
  flex-direction: column;
}

/* Green background for open accordion header */
.accordion-button:not(.collapsed) {
    background-color: rgb(78, 78, 78) !important; /* Your desired green */
    color: #fff !important;
    box-shadow: none;
    border-color: gray !important;
  }
  
  /* Optional: Green border for the open accordion */
  .accordion-button:not(.collapsed)::after {
    filter: invert(1) grayscale(1) brightness(2); /* Makes the arrow white */
  }



section[id] {
  scroll-margin-top: 90px; /* Adjust to your header height */
}

h2[id], h3[id], h4[id] {
  scroll-margin-top: 90px;
}