:root {
  --bs-font-sans-serif: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
}

body {
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}


 /* Critical fix for full-height sidebar */
        html, body {
            height: 100%;
        }
        
        body {
            overflow-x: hidden;
        }
        
        /* Make the main wrapper use flex with stretch */
        main.d-flex {
            display: flex;
            min-height: 100vh;
        }
        
        /* Make the sidebar a flex column that stretches */
        .sidebar-wrapper {
            position: sticky;
            top: 0;
            height: 100vh;
            z-index: 1000;
            overflow-y: auto;
        }
        
        /* Ensure content area can scroll independently */
        .content-wrapper {
            flex: 1;
            overflow-x: auto;
        }
        /* Sticky sidebar solution */
        html, body {
        height: 100%;
        }

        .d-flex.flex-column.flex-shrink-0.p-3.text-bg-dark {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
        }


.font-monospace {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}

main {
    height: -webkit-fill-available;
    max-height: 100vh;
}
.text-bg-dark { background-color: #2b3643;}
.text-bg-dark,
.text-bg-dark a { color:#b4bcc8}

  /* Wiki Icon Styling */
        .wiki-icon {
            color: #0066cc;
            cursor: pointer;
            margin: 0 5px;
            transition: color 0.3s;
            font-size:20px !important
        }
        .wiki-icon:hover {
            color: #004499;
        }
        
        /* Tooltip Styling */
        #wiki-tooltip {
            display: none;
            position: absolute;
            max-width: 400px;
            background-color: #fff;
            border: 1px solid #ccc;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0,0,0,0.2);
            padding: 15px;
            z-index: 1000;
        }
        
        .tooltip-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }
        
        .tooltip-title {
            font-weight: bold;
            font-size: 16px;
        }
        
        .tooltip-close {
            cursor: pointer;
            font-size: 18px;
            color: #777;
        }
        
        .tooltip-content {
            margin-bottom: 15px;
        }
        .tooltip-content img {
            width:100%;
            height:auto
        }
        
        .tooltip-tags {
            border-top: 1px solid #eee;
            padding-top: 10px;
            font-size: 12px;
        }
        
        .tag {
            display: inline-block;
            background-color: #f1f1f1;
            padding: 3px 8px;
            margin: 2px;
            border-radius: 3px;
            text-decoration: none;
            color: #444;
        }
        
        .tag:hover {
            background-color: #e0e0e0;
        }


        /* wiki manage */
         .wiki-entry {
            margin-bottom: 30px;
            padding: 15px;
            border: 1px solid #ddd;
            border-radius: 5px;
            background-color: #f9f9f9;
        }
        
        .wiki-title {
            font-size: 18px;
            margin-bottom: 10px;
            color: #0066cc;
        }
        
        .wiki-content {
            margin-bottom: 15px;
        }
        
        .wiki-tags {
            font-size: 12px;
            margin-top: 10px;
        }
        ul.wiki-tags { display: flex;gap:5px;padding-left:0}
        
        .tag {
            display: inline-block;
            background-color: #f1f1f1;
            padding: 3px 8px;
            margin: 2px;
            border-radius: 3px;
            text-decoration: none;
            color: #444;
        }
        
        .tag:hover {
            background-color: #e0e0e0;
        }
        
        .back-link {
            display: inline-block;
            margin: 20px 0;
            color: #0066cc;
            text-decoration: none;
        }
        
        .back-link:hover {
            text-decoration: underline;
        }
        
        .error {
            color: #cc0000;
            padding: 10px;
            background-color: #ffeeee;
            border: 1px solid #ffcccc;
            border-radius: 5px;
        }
        
        .no-results {
            padding: 20px;
            background-color: #f5f5f5;
            border-radius: 5px;
            text-align: center;
            color: #666;
        }

        /* tag auto complete */
         /* Container styling */
        .tag-input-container {
            width: 100%;
            max-width: 600px;
            margin: 20px 0;
            font-family: Arial, sans-serif;
        }
        
        /* Input field styling */
        .tag-input {
            width: 100%;
            padding: 8px;
            border: 1px solid #ccc;
            border-radius: 4px;
            margin-bottom: 5px;
            box-sizing: border-box;
        }
        
        /* Tag display area */
        .tags-display {
            min-height: 40px;
            padding: 5px;
            border: 1px solid #ddd;
            border-radius: 4px;
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
            margin-bottom: 10px;
            background-color: #f9f9f9;
        }
        
        /* Individual tag styling */
        .tag {
            background-color: #e0f0ff;
            border: 1px solid #b0d0f0;
            border-radius: 3px;
            padding: 3px 8px;
            display: inline-flex;
            align-items: center;
        }
        
        /* Remove tag button */
        .remove-tag {
            margin-left: 5px;
            cursor: pointer;
            color: #666;
            font-weight: bold;
        }
        
        /* Suggestions dropdown */
        .suggestions {
            position: absolute;
            max-height: 200px;
            overflow-y: auto;
            border: 1px solid #ddd;
            border-radius: 4px;
            background-color: white;
            width: calc(100% - 2px);
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            z-index: 1000;
            display: none;
        }
        
        .suggestion-item {
            padding: 8px 10px;
            cursor: pointer;
        }
        
        .suggestion-item:hover {
            background-color: #f0f8ff;
        }
        
        .active-suggestion {
            background-color: #e6f2ff;
        }
        
        .highlight {
            font-weight: bold;
            color: #0066cc;
        }

        #wikiPageBody h2, 
        #wikiPageBody h3,
        #wikiPageBody h4  {
            font-weight:600;
            margin-top: 1em;
            font-size:1.1em;
        }
     