@import url('../SearchResultSuggestions.css'); /*importing search result suggestions*/

/* Base styles */
        body, html {
            margin: 0;
            padding: 0;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Lato', 'Helvetica', 'Arial', sans-serif;
            line-height: 1.6;
            font-size: 16px;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            scroll-behavior: smooth;
        }
        h1, h2, h3, h4, h5, h6 {
            font-family: Georgia, serif;
        }
        h1 { 
            font-size: 29px;
            font-family: Georgia, serif;
        }
        h2 { font-size: 1.5rem; }

        /* Layout */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 1rem;
        }
        .flex { display: flex; }
        .flex-col { flex-direction: column; }
        .flex-1 { flex: 1; }
        .items-center { align-items: center; }
        .justify-between { justify-content: space-between; }
        .space-x-4 > * + * { margin-left: 1rem; }

        /* Header */
        .header {
            display: flex;
            align-items: center;
            padding: 10px;
            border-bottom: 1px solid #a2a9b1;
            position: relative;
            background-color: white;
            padding-left: 2.75rem;
            padding-right: 2.75rem;
        }
        .burger-menu {
            font-size: 20px;
            cursor: pointer;
            margin-right: 15px;
        }
        .mobile-burger-menu{display: none;}
        .logo {
            font-weight: bold;
            font-size: 24px;
            margin-right: 20px;
        }
        .logo > a {
            text-decoration: none;
            color: #000;
        }
        .logo > a:hover {
            color: #0645ad;
        }
        /*Logo Darkmode*/
        a.logoTextMode.dark{
            color: #ffffff;
        }

        .search-bar {
            display: flex;
            align-items: center;
            width: 300px;
            margin-right: auto;
        }
        .search-bar input {
            width: 100%;
            padding: 8px;
            border: 1px solid #a2a9b1;
            border-radius: 2px 0 0 2px;
        }
        .search-bar button {
            padding: 8px 12px;
            background-color: #000;
            color: white;
            border: none;
            border-radius: 0 2px 2px 0;
            cursor: pointer;
        }
        .right-links {
            display: flex;
            align-items: center;
        }
        .right-links a {
            margin-left: 15px;
            text-decoration: none;
            color: #202122;
        }
        .three-dots {
            font-size: 20px;
            cursor: pointer;
            margin-left: 15px;
        }

        /* Main content */
        .main-content {
            display: flex;
            padding: 20px;
            /*max-width: 1200px;*/
            margin: 0 auto;
            flex: 1;
        }
        .sidebar-left {
            width: 250px;
            background-color: white;
            border-right: 1px solid #e5e7eb;
            padding: 1rem;
            /*height: calc(100vh - 60px);*/
            height: 100%;
            position: sticky;
            top: 0;
            overflow-y: auto;
        }
        .main-article {
            flex: 1;
            padding: 0.6rem 1rem;
            max-width: 800px;
            margin: 0 auto;
        }
        .sidebar-right {
            width: 250px;
            background-color: white;
            border-left: 1px solid #e5e7eb;
            padding: 1rem;
            /*height: calc(100vh - 60px);*/
            height: 100%;
            position: sticky;
            top: 0;
            overflow-y: hidden;
        }

        /* Footer */
        .footer {
            background-color: #f8f9fa;
            border-top: 1px solid #a2a9b1;
            padding: 20px;
            font-size: 13px;
            color: #202122;
        }
        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
        }
        .footer-links {
            display: flex;
            flex-wrap: wrap;
        }
        .footer-links a {
            color: #0645ad;
            text-decoration: none;
            margin-right: 15px;
        }
        .footer-info {
            text-align: right;
        }

        /* Utility classes */
        .hidden { display: none; }
        .mb-4 { margin-bottom: 1rem; }
        .text-sm { font-size: 0.875rem; }
        .font-semibold { font-weight: 600; }
        .hover\:underline:hover { text-decoration: underline; }

        /* Dark mode */
        .dark-theme {
            background-color: #202124;
            color: #e8eaed;
        }
        .dark-theme .header,
        .dark-theme .sidebar-left,
        .dark-theme .sidebar-right,
        .dark-theme .footer {
            background-color: #35363a;
            border-color: #5f6368;
        }
        .dark-theme .search-bar input {
            background-color: #202124;
            color: #e8eaed;
            border-color: #5f6368;
        }
        .dark-theme .right-links a,
        .dark-theme .footer-links a {
            color: #8ab4f8;
        }
        .dark-theme .footer {
            color: #bdc1c6;
        }
        .dark-theme .main-article,
        .dark-theme .toc {
            color: #e8eaed;
        }
        .dark-theme .burger-menu,
        .dark-theme .logo,
        .dark-theme .three-dots {
            color: #ffffff;
        }
        .dark-theme .sidebar-left h3,
        .dark-theme .sidebar-right h3 {
            color: #ffffff;
        }
        .dark-theme .toc-toggle {
            color: #ffffff;
            background-color: #4a4a4a;
        }
        .dark-theme .toc a {
            color: #2962bf;
        }
        .dark-theme .appearance-panel {
            background-color: #35363a;
            color: #e8eaed;
        }

        /* Responsive design */
        @media (max-width: 1024px) {
            .main-content {
                flex-direction: column;
            }
            .sidebar-left, .sidebar-right {
                width: 100%;
                height: auto;
                position: static;
                border: none;
            }
        }
        @media (max-width: 768px) {
            .right-links, .sidebar-right, .burger-menu{display: none;}
            .header {padding: 8px 10px;}
            .search-result-description{margin: 0;}
            .search-results-container{margin-right: 0;}
            .search-bar{width: auto;}
            .footer-content{flex-direction: column;}
            .footer-info{text-align: center;}
            main.main-article > h1 {
                    line-height: 1.2em;
                    font-size: 25px;
                }
                h2{font-size: 1.3rem;}
            .mobile-burger-menu{
                display: block;
                font-size: 20px;
                cursor: pointer;
                margin-right: 15px;
            }
        }

        /* Additional styles */
        .expandable-menu, .options-dropdown {
            display: none;
            position: absolute;
            background-color: white;
            border: 1px solid #a2a9b1;
            padding: 10px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
            z-index: 1000;
        }
        .expandable-menu {
            left: 10px;
            top: 50px;
        }
        .options-dropdown {
            right: 10px;
            top: 50px;
        }
        .show {
            display: block;
        }

        /* Table of Contents styles */
        .toc {
            background-color: #f8f9fa;
            border: 1px solid #a2a9b1;
            padding: 10px;
            margin-bottom: 20px;
        }
        .toc-title {
            font-weight: bold;
            margin-bottom: 10px;
        }
        .toc ul {
            list-style-type: none;
            padding-left: 20px;
        }
        .toc li {
            margin-bottom: 5px;
        }
        .toc a {
            text-decoration: none;
            color: #0645ad;
        }
        .toc a:hover {
            text-decoration: underline;
        }

        /* Appearance panel styles */
        .appearance-panel {
            background-color: #f8f9fa;
            border: 1px solid #a2a9b1;
            padding: 15px;
            margin-bottom: 20px;
        }
        .appearance-panel h3 {
            margin-top: 0;
            margin-bottom: 10px;
        }
        .setting-group {
            margin-bottom: 15px;
        }
        .setting-group label {
            display: block;
            margin-bottom: 5px;
        }

        .bg-wide-width{
            max-width: 930px;
        }

        .bg-standard-width {
            max-width: 800px;
        }

        /* Table of Contents toggle */
        .toc-toggle {
            cursor: pointer;
            color: #020202;
            text-decoration: underline;
            font-size: 12px;
            background-color: #cfcfcf;
            font-weight: 100;
            padding: 4px 5px;
            border-radius: 2px;
        }
        .toc-icon {
            display: none;
            position: fixed;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            background-color: #f8f9fa;
            border: 1px solid #a2a9b1;
            padding: 10px;
            cursor: pointer;
            z-index: 1000;
        }

         /* Menu Drawer CSS for Mobile*/
         .drawer {
            position: fixed;
            left: -280px;
            top: 0;
            width: 280px;
            height: 100vh;
            background-color: #f8f9fa;
            transition: transform 0.3s ease;
            z-index: 1000;
            box-shadow: 2px 0 5px rgba(0,0,0,0.1);
            overflow-y: auto;
        }
        .drawer.show {
            transform: translateX(280px);
        }
        .drawer-menu {
            padding: 20px 0;
        }
        .drawer-item {
            display: flex;
            align-items: center;
            padding: 12px 24px;
            text-decoration: none;
            color: #202122;
        }
        .drawer-item:hover {
            background-color: #eaecf0;
        }
        .drawer-item i {
            margin-right: 15px;
            width: 20px;
            text-align: center;
        }
        .drawer-footer {
            padding: 20px 24px;
            border-top: 1px solid #a2a9b1;
        }
        .drawer-footer a {
            display: block;
            color: #202122;
            text-decoration: none;
            margin-bottom: 10px;
            font-size: 14px;
        }
        .drawer-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background-color: rgba(0,0,0,0.5);
            display: none;
            z-index: 999;
        }
        .drawer-overlay.show {
            display: block;
        }
        /* Desktop styles */
        @media (min-width: 769px) {
            .drawer, .drawer-overlay {
                display: none !important;
            }
        }
        /* Close icon styles */
        .drawer-close {
            position: absolute;
            top: 10px;
            right: 10px;
            font-size: 24px;
            cursor: pointer;
            color: #202122;
        }
        /* DATE Posted and Last Edit Styles */
        .bg-dateposted {
            display: flex;
            flex-direction: row;
            justify-content: center;
            gap: 20px;
            font-size: 12px;
            color: #746f6f;
        }