/* Main container layout */
.main-container {
    display: flex;
    height: calc(100vh - 60px); /* Subtract navbar height */
    width: 100%;
}

/* Desktop-style sidebar (20%) */
.desktop-sidebar {
    width: 20%;
    min-width: 200px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid #f5f5f5;
}

/* Folder grid */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 10px;
    align-items: center; /* Centers items vertically in the grid */
    min-height: 100%; /* Ensures grid takes full height */
}

/* Folder item */
.folder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centers content vertically */
    text-align: center;
    padding: 5px;
    border-radius: 8px;
    transition: transform 0.2s ease, background-color 0.2s;
    height: 100%; /* Makes all items same height */
}

.folder-item a{
    color:#fff;
    text-decoration:none;
}
.folder-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.folder-item:active {
    transform: translateY(1px);
}

/* Folder emoji */
.folder-emoji {
    font-size: 32px;
    margin-bottom: 0;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.folder-item:hover .folder-emoji {
    transform: scale(1.1) rotate(-5deg);
}

.folder-item:active .folder-emoji {
    transform: scale(0.95) rotate(0deg);
}

/* Folder title */
.folder-title {
    font-size: 12px;
    color: #333;
    word-break: break-word;
    max-width: 100%;
    margin-top: 5px;
    transition: transform 0.2s ease;
}

.folder-item a {
    color: #333;
    text-decoration: none;
}

.folder-item:hover .folder-title {
    transform: scale(1.05);
}

.folder-item:active .folder-title {
    transform: scale(0.98);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 10px;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

/* Add these styles for the h2 and notion-link */
.page-header h2 {
    margin: 0;  /* Remove default margins */
    font-size: 18px;
    line-height: 1;  /* Adjust line height */
    display: flex;
    align-items: center;  /* Vertically center content */
}

.page-header .notion-link {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: #0066b8;
    text-decoration: none;
    background: #f3f3f3;
    transition: all 0.2s ease;
}

.page-header .notion-link:hover {
    background: #e8e8e8;
}
/* Dropdown menu */
.dropdown-menu {
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}
ul.dropdown-menu-hover {
    border:none;
}

.dropdown-toggle::after{
    display:none;
}
/* Presentation area (80%) */
.presentation-area {
    flex: 1;
    padding: 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    overflow-y: auto;
    height: calc(100vh - 60px);
}

/* Content wrapper */
.content-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 0;
    min-height: 100%;
    overflow-y: auto;
}

/* Nested menu container */
.page-content {
    position: relative;
}

/* First level items */
.n-pages {
    list-style: none;
    padding: 0;
    margin: 0;
    background: white;
    border-radius: 4px;
    position: relative;
}

.n-item {
    position: relative;
    width:300px;
}

.n-item:last-child {
    border-bottom: none;
}

.n-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.n-title {
    margin-left: 8px;
    font-size: 13px;
    white-space:normal;
    word-break: break-all; /* Breaks long words (e.g., URLs) if necessary */
  overflow-wrap: break-word; /* Allows breaking within long words */
}

/* Update submenu styling */
.dropdown-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 200px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 4px;
    z-index: 1000;
}

/* Create a wider hover area */
.n-item {
    position: relative;
}

/* Add hover area to the right of menu items */
.n-item::after {
    content: '';
    position: absolute;
    top: 0;
    right: -30px; /* Wider hover bridge */
    width: 30px;
    height: 100%;
    z-index: 999;
    background: transparent;
}

/* Add hover area to the left of submenus */
.dropdown-submenu::before {
    content: '';
    position: absolute;
    top: 0;
    left: -30px; /* Wider hover bridge */
    width: 30px;
    height: 100%;
    z-index: 999;
    background: transparent;
}

/* Keep submenu visible */
.n-item.has-submenu > .dropdown-submenu {
    display: block;
}

/* Visual feedback for active items */
.n-item.active > .n-link {
    background-color: #f5f5f5;
}

/* Ensure submenus stay in view */
.dropdown-submenu .dropdown-submenu {
    top: 0;
}

/* Visual feedback */
.n-link:hover {
    background-color: #f5f5f5;
}

/* Loading states */
.loading-indicator {
    display: inline-block;
    margin-left: 8px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .desktop-sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
    }
    
    .folder-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .folder-emoji {
        font-size: 28px;
    }
    
    .dropdown-submenu {
        position: static;
        box-shadow: none;
        margin-left: 20px;
    }
    
    .n-item:hover > .dropdown-submenu {
        display: none;
    }
    
    .n-item.active > .dropdown-submenu {
        display: block;
    }
}

/* Modern scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
    border: 2px solid #f5f5f5;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

/* VS Code Light Theme Navbar Styles */
.navbar {
    background: #f3f3f3;
    border-bottom: 1px solid #e0e0e0;
    padding: 4px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 42px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    gap: 2px; /* Add gap between elements */
}

/* Search Container */
.search-container {
    flex: 0 1 400px; /* Allow shrinking but limit initial width */
    min-width: 200px;
    position: relative;
}

.search-container::before {
    content: "🔍";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.7;
}

.search-input {
    width: 100%;
    padding: 5px 12px 5px 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #ffffff;
    color: #333333;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #0066b8;
    box-shadow: 0 0 0 2px rgba(0,102,184,0.2);
}

.search-input::placeholder {
    color: #888;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-button {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Button variants with emojis */
.cache-button::before {
    content: "🔄";
    margin-right: 6px;
}

.notion-button::before {
    content: "📝";
    margin-right: 6px;
}

/* Button hover states */
.action-button:hover {
    background: #f5f5f5;
    border-color: #ccc;
    text-decoration: none;
}

.action-button:active {
    background: #e8e8e8;
    border-color: #bbb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar {
        padding: 8px;
        height: auto;
        flex-wrap: wrap;
        gap: 8px;
    }

    .search-container {
        order: 2;
        width: 100%;
        max-width: none;
        margin-right: 0;
    }

    .action-buttons {
        order: 1;
        width: 100%;
        justify-content: space-between;
    }

    .action-button {
        flex: 1;
        justify-content: center;
        padding: 8px;
    }
}

/* Welcome background styles */
.welcome-background {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    min-height: calc(100vh - 100px);
    position: relative; /* For absolute positioning of caption */
}

.welcome-background img {
    width: 100%;
    height: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Remove old caption styles */
.welcome-background #image-caption {
    display: none;
}

/* Add navbar caption styles */
.navbar-caption {
    font-size: 12px;
    color: #666;
    margin: 0 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-caption a {
    color: #0066cc;
    text-decoration: none;
}

.navbar-caption a:hover {
    text-decoration: underline;
}

.folder-item .dropdown-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centers content vertically */
    width: 100%;
    height: 100%; /* Takes full height of parent */
}



