/* Base Layout Styles
-------------------------------------------------- */

/* Body base styles */
body {
    font-family: 'Nunito Sans', sans-serif;
    background-color: #f8f9fa;
}

/* Sidebar styles */
.sidebar {
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    padding-top: 56px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    background-color: #fff;
    width: 188px;
    transition: width 0.3s ease; /* Specify width for better browser compatibility */
}

/* Move all sidebar icons slightly to the left */
.sidebar .nav-link {
    padding-left: 0.75rem;
    position: relative;
    font-size: 0.9rem; /* Slightly smaller font for better fit */
}

/* Only apply left margin to direct icon children (not collapsible menus) */
.sidebar .nav-item:not(.has-submenu) .nav-link i:first-child {
    margin-left: -0.25rem;
}

/* Slightly smaller font for section headers */
.sidebar .nav-item {
    font-size: 0.9rem;
}

/* For collapsible menus, adjust the icon inside the div */
.sidebar .sidebar-collapsible-menu .nav-link i.bi {
    margin-left: -0.25rem;
}

/* Full width hover background */
.sidebar .nav-link::before {
    content: '';
    position: absolute;
    left: -1rem;
    right: -1rem;
    top: 0;
    bottom: 0;
    background-color: transparent;
    z-index: -1;
    transition: background-color 0.2s;
}

.sidebar .nav-link:hover::before {
    background-color: rgba(13, 110, 253, 0.1);
}

/* Collapsed sidebar */
.sidebar.collapsed {
    min-width: 60px;
    width: 60px;
}

.sidebar.collapsed .p-3 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
    display: flex !important;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

/* But show spans in submenus */
.sidebar.collapsed .sidebar-submenu .nav-link span {
    display: inline !important;
}

/* Ensure submenu items also have smaller font */
.sidebar .sidebar-submenu {
    font-size: 0.9rem;
}

.sidebar.collapsed .nav-item:not(.has-submenu) .nav-link i:first-child {
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.sidebar.collapsed .nav-item .text-muted {
    display: none;
}

/* Constrain hover background in collapsed mode to full sidebar width */
.sidebar.collapsed .nav-link::before {
    left: 0;
    right: 0;
}

/* Center collapsible menu items in collapsed mode */
.sidebar.collapsed .sidebar-collapsible-menu {
    width: 100%;
}

.sidebar.collapsed .sidebar-collapsible-menu .nav-link {
    width: 100%;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.sidebar.collapsed .sidebar-collapsible-menu .nav-link > div {
    display: flex;
    justify-content: center;
    margin: 0;
}

.sidebar.collapsed .sidebar-collapsible-menu > .nav-link i.bi {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Hide chevrons in collapsed mode */
.sidebar.collapsed .sidebar-collapsible-menu .nav-link i:last-child {
    display: none;
}

/* Hide submenus by default in collapsed mode */
.sidebar.collapsed .sidebar-collapsible-menu .sidebar-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    z-index: 1050;
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 0 4px 4px 0;
    padding: 0.5rem;
    min-width: 200px;
}

/* Show submenu on hover in collapsed mode */
.sidebar.collapsed .sidebar-collapsible-menu:hover .sidebar-submenu {
    display: block;
}

/* Submenu items should show text and be left-aligned */
.sidebar.collapsed .sidebar-collapsible-menu .sidebar-submenu .nav-link {
    justify-content: flex-start !important;
    padding-left: 0.5rem;
}

.sidebar.collapsed .sidebar-collapsible-menu .sidebar-submenu .nav-link i.bi {
    margin-left: 0 !important;
}

/* Cube Page Styles
-------------------------------------------------- */
.status-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}

.property-line {
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-value {
    margin-left: 5px;
}

/* Toggle button */
.sidebar-toggle {
    position: fixed; /* Position fixed instead of absolute */
    top: 70px;
    left: 178px; /* Position from left instead of right */
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 1031; /* Higher than sidebar */
    border: none;
    padding: 0;
    transition: left 0.3s ease; /* Match sidebar transition */
}

.sidebar-toggle:hover {
    background-color: #f8f9fa;
}

.sidebar-toggle:focus {
    outline: none;
}

/* Toggle button position when sidebar is collapsed */
.sidebar.collapsed + .sidebar-toggle {
    left: 50px;
}

/* Content area */
.main-content {
    margin-left: 188px;
    padding: 20px;
    padding-top: 76px;
    transition: margin-left 0.3s ease; /* Specify margin-left for better browser compatibility */
    width: calc(100% - 188px); /* Ensure main content takes full width minus sidebar */
    position: relative; /* To properly position the toggle button */
}

/* Main content when sidebar is collapsed */
.sidebar.collapsed ~ .main-content {
    margin-left: 60px;
    width: calc(100% - 60px);
}

/* Full-width content (used in kanban view) */
.main-content-full {
    padding-left: 0;
    padding-right: 0;
}

/* Navbar */
.top-navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .sidebar {
        margin-left: -188px;
    }
    
    .sidebar.collapsed {
        margin-left: -60px;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar.collapsed ~ .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: none; /* Hide toggle on mobile */
    }
}

/* Custom avatar styling 
-------------------------------------------------- */
.avatar-group {
    display: flex;
}

.avatar {
    position: relative;
    display: inline-block;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-weight: bold;
    color: white;
    font-size: 0.8rem;
    border-radius: 50%;
}

/* Kanban Board Styles
-------------------------------------------------- */
.kanban-container {
    display: flex;
    overflow-x: auto;
    padding: 0.5rem;
    margin: 0;
    width: 100%;
    min-height: calc(100vh - 120px);
    align-items: flex-start; /* Ensure columns align at the top */
}

.kanban-column {
    min-width: var(--kanban-column-width, 375px);
    width: var(--kanban-column-width, 375px);
    border-radius: 0.5rem;
    background-color: #f5f5f5;
    margin-right: 1rem;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
}

/* Make the last column's margin-right 0 */
.kanban-column:last-child {
    margin-right: 0;
}

/* Make selected node in path match kanban column width */
.path-selected-node {
    width: var(--kanban-column-width, 300px);
    max-width: var(--kanban-column-width, 300px);
    margin-left: 1.25rem; /* Align with first kanban column */
}

.path-selected-node .card {
    width: 100%;
    max-width: 100%;
}

/* Lane-based path centering 
.row.justify-content-center[data-lanes] {
    position: relative;
    z-index: 10;
}
*/

/* Dynamic path positioning based on number of lanes (adjusted for 25% wider columns)
.row[data-lanes="1"] {
    margin-left: 0;
}

.row[data-lanes="2"] {
    margin-left: 235px;
}

.row[data-lanes="3"] {
    margin-left: 500px;
}

.row[data-lanes="4"] {
    margin-left: 685px;
}

.row[data-lanes="5"] {
    margin-left: 875px;
}

.row[data-lanes="6"] {
    margin-left: 1065px;
}

.row[data-lanes="7"] {
    margin-left: 1250px;
}

.row[data-lanes="8"] {
    margin-left: 1435px;
}

.row[data-lanes="9"] {
    margin-left: 1625px;
}

.row[data-lanes="10"] {
    margin-left: 1815px;
}
*/
/* For more than 10 lanes, use a more dynamic approach with JavaScript */

/* For more than 8 lanes, use a more dynamic approach */
.row.justify-content-center[data-lanes]:not([data-lanes="1"]):not([data-lanes="2"]):not([data-lanes="3"]):not([data-lanes="4"]):not([data-lanes="5"]):not([data-lanes="6"]):not([data-lanes="7"]):not([data-lanes="8"]) {
    margin-left: calc(50% - var(--lanes-offset, 600px));
}

.kanban-column-header {
    padding: 0.75rem 0.75rem 0.5rem 0.75rem;
    font-weight: bold;
    flex-shrink: 0; /* Prevent the header from shrinking */
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.kanban-items-container {
    flex-grow: 1;
    overflow-y: scroll;
    padding: 0.5rem;
    min-height: 100px; /* Ensure enough space for items */
}

.kanban-item, .sortable-item-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    background-color: white;
    border-radius: 0.25rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: grab;
    overflow: visible !important;
}

.kanban-item:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Kanban header card - non-draggable summary card */
.kanban-header-card {
    margin: 0.5rem;
    border-radius: 0.5rem;
    background-color: white;
    overflow: hidden;
    height: fit-content;
    flex-shrink: 0; 
    min-height: 60px;
    box-sizing: content-box;
}

.kanban-summary-card {
    border: 0;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.kanban-summary-card:hover {
    background-color: #f8f9fa;
}

.kanban-card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s ease;
    height: fit-content;
    flex-shrink: 0;
    margin-bottom: 8px; /* Consistent spacing between cards */
    overflow: visible !important;
    width: 100%;
    box-sizing: border-box;
}

.kanban-card:hover {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.scrollbar {
    /* Modern CSS for Firefox and supporting browsers */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;

    /* Force overlay scrollbars to prevent layout shifts */
    scrollbar-gutter: stable both-edges;
}

/* Webkit scrollbar styling for Chrome/Safari/Edge */
.scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    min-height: 20px;
}

.scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.scrollbar::-webkit-scrollbar-corner {
    background: transparent;
}

/* Enhanced cross-platform scrollbar for kanban containers */
.kanban-items-container.scrollbar {
    /* Prevent scrollbar from affecting layout */
    overflow: overlay;
    overflow-y: auto;

    /* Reserve space for scrollbar to prevent content jumping */
    padding-right: 0.5rem;
    margin-right: -0.5rem;
}

/* Fallback for browsers that don't support overflow: overlay */
@supports not (overflow: overlay) {
    .kanban-items-container.scrollbar {
        overflow-y: scroll;
        /* Add extra padding to account for scrollbar width on Windows */
        padding-right: calc(0.5rem + 8px);
        margin-right: calc(-0.5rem - 8px);
    }
}

/* Sortable styles */
.sortable-ghost {
    opacity: 0.4;
}

.sortable-drag {
    opacity: 0.8;
    transform: rotate(-5deg);
    position: relative;
    top: 5px;
}

.sortable-dragging {
    cursor: grabbing !important;
}

/* Prevent text selection during drag operations - fix for Chrome */
body.sortable-dragging {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.sortable-drag * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Toast Messages
-------------------------------------------------- */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1100;
}

/* Modal Adjustments 
-------------------------------------------------- */
.modal-backdrop {
    z-index: 1040;
}

.modal {
    z-index: 1050;

}

/* Kanban stats table */
.kanban-stats-table {
    width: 100%;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    border-collapse: collapse;
    background-color: white;
}

.kanban-stats-table th, 
.kanban-stats-table td {
    padding: 2px 6px;
    text-align: right;
    border: 1px solid #e9ecef;
}

.kanban-stats-table th:first-child,
.kanban-stats-table td:first-child {
    text-align: right;
    font-weight: 600;
}

.kanban-stats-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #6c757d;
}

.kanban-stats-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.kanban-stats-table tr:hover {
    background-color: #e9ecef;
}

/* Kanban stats table row status colors */
.kanban-stats-row-danger {
    background-color: rgba(220, 53, 69, 0.15) !important;
}

.kanban-stats-row-warning {
    background-color: rgba(255, 193, 7, 0.15) !important;
}

.kanban-stats-row-success {
    background-color: rgba(25, 135, 84, 0.15) !important;
}

.kanban-stats-row-info {
    background-color: rgba(13, 110, 253, 0.15) !important;
}

.kanban-stats-row-default {
    /* Default row color handled by existing styles */
}

/* Override the hover effect for status rows */
.kanban-stats-row-danger:hover,
.kanban-stats-row-warning:hover,
.kanban-stats-row-success:hover,
.kanban-stats-row-info:hover {
    background-color: rgba(0, 0, 0, 0.075) !important;
}

/* START - BAT by CURSOR 2024-05-XX
Why: Add styles for MyToDo view components
What: Custom CSS for MyToDo layout and interactions */

/* MyToDo Container */
.mytodo-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

/* Filters */
.mytodo-filters {
    position: sticky;
    top: 56px;
    z-index: 1020;
    background: #fff;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0,0,0,.1);
}

/* Scrollable List */
.mytodo-list {
    margin-top: 1rem;
}

/* Section Headers */
.mytodo-section-header {
    padding: 0.75rem 1rem;
    background-color: #198754;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 1px;
}

.mytodo-section-header:hover {
    background-color: #157347;
}

.mytodo-section-header .section-icon {
    transition: transform 0.2s;
}

.mytodo-section-header[aria-expanded="true"] .section-icon {
    transform: rotate(90deg);
}

/* Cards */
.mytodo-card {
    background: #fff;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.mytodo-card-header {
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,.125);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mytodo-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.mytodo-card-body {
    padding: 0.75rem;
}

/* Empty States */
.mytodo-empty-state {
    padding: 1rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Tree Dropdown Menu */
.scrollable-menu {
    height: auto;
    max-height: 400px;
    overflow-x: hidden;
}

/* Legend Modal */
.legend-item {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .mytodo-container {
        padding: 0.5rem;
    }
    
    .mytodo-card-body .row {
        margin: -0.25rem;
    }
    
    .mytodo-card-body .col-6 {
        padding: 0.25rem;
    }
}

/* MyToDo: Highlight dropdown menu items on hover/focus with the same gray as the Type filter button */
.dropdown-item:focus, .dropdown-item:hover {
    background-color: #6c757d !important; /* Bootstrap secondary */
    color: #fff !important;
}

/* MyToDo: Bootstrap 5 dropdown submenu support (expand downward for mobile) */
.dropdown-submenu > .dropdown-menu {
    top: 100%;
    left: 0;
    margin-top: 0;
    margin-left: 0;
    position: absolute;
    min-width: 10rem;
    display: none;
    z-index: 1051;
}

.dropdown-submenu:hover > .dropdown-menu,
.dropdown-submenu:focus-within > .dropdown-menu {
    display: block;
}

.dropdown-submenu > .dropdown-item:after {
    content: "\25BC"; /* Down arrow */
    float: right;
    margin-left: 0.5em;
    font-size: 0.8em;
    opacity: 0.7;
}

.btn-xs {
    padding: 0.15rem 0.3rem;
    font-size: 0.675rem;
    line-height: 1.2;
    border-radius: 0.15rem;
    height: 22px;
}

.linkmenu-xs {
    width: 64px;
}

.linkmenu-wide {
    width: 100%;
    max-width: 200px;
}

/* MyToDo: Dark orange button for 'When' */
.btn-darkorange {
    background-color: #d35400 !important;
    color: #fff !important;
    border-color: #d35400 !important;
}
.btn-darkorange:hover, .btn-darkorange:focus {
    background-color: #b34700 !important;
    color: #fff !important;
    border-color: #b34700 !important;
}

/* MyToDo: Green button for 'What' (matches section headers) */
.btn-mytodo-green {
    background-color: #198754 !important;
    color: #fff !important;
    border-color: #198754 !important;
}
.btn-mytodo-green:hover, .btn-mytodo-green:focus {
    background-color: #157347 !important;
    color: #fff !important;
    border-color: #157347 !important;
}
/* END - BAT by CURSOR 2024-05-XX */

.nodemenu-open-menu {
    z-index: 2000;
} 

/* Prevent Bootstrap modal from adding padding-right to body which interferes with HTMX */
body.modal-open {
    padding-right: 0 !important;
} 


.kanban-column .card,
.kanban-item .card,
.sortable-item-wrapper .card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Editable field styling */
.editable-field {
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.editable-field:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

/* Document Tree Expand/Collapse Styles
-------------------------------------------------- */
.node-children {
    margin-left: 0.75rem;
}

.expand-link, .collapse-link {
    transition: color 0.2s ease;
}

.expand-link:hover, .collapse-link:hover {
    color: #0d6efd !important;
}

.expand-link:hover .fas, .collapse-link:hover .fas {
    color: #0d6efd !important;
}

.child-node {
    border-left: 2px solid #e9ecef;
    padding-left: 0.75rem;
    margin-left: 0.5rem;
}

.document-heading {
    scroll-margin-top: 80px; /* Account for fixed header */
}

.kanban-column-title {
    font-weight: bold;
    font-size: 1.5em;  /* 50% bigger */
    color: #495057;  /* Dark gray */
}

.path-breadcrumb {
    margin-left: 1.25rem;
}

/* MyToDo Panel Styles
-------------------------------------------------- */
.todo-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transform: translateX(0); /* Default: visible */
}

.todo-panel.hidden {
    transform: translateX(100%) !important; /* Slide completely off-screen */
}

.todo-panel-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.todo-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Hide tab - shows on left side of panel when open */
.todo-panel-hide-tab {
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 80px;
    background: white;
    border: 1px solid #dee2e6;
    border-right: none;
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    z-index: 1;
    transition: background-color 0.2s;
}

.todo-panel.hidden .todo-panel-hide-tab {
    display: none;
}

.todo-panel-hide-tab:hover {
    background-color: #f8f9fa;
}

.todo-panel-hide-tab i {
    font-size: 1.2rem;
    color: #6c757d;
}

/* Show tab - displays when panel is hidden */
.todo-panel-show-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 80px;
    background: #0d6efd;
    border: none;
    border-radius: 8px 0 0 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: -2px 0 5px rgba(0,0,0,0.2);
    z-index: 1050;
    transition: background-color 0.2s;
}

.todo-panel-show-tab:hover {
    background-color: #0b5ed7;
}

.todo-panel-show-tab i {
    font-size: 1.5rem;
    color: white;
}

.todo-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background: #0d6efd;
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.todo-toggle:hover {
    transform: scale(1.1);
}

.todo-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.75rem;
    min-width: 20px;
    text-align: center;
}

/* Todo status section styles */
.todo-status-section {
    margin-bottom: 1rem;
}

.todo-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
}

.todo-status-content {
    overflow: visible;
    transition: none;
}

.todo-status-content.collapsed {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.todo-item {
    padding: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

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

/* Sidebar Submenu Styles
-------------------------------------------------- */
/* Hide bullets in sidebar submenus */
.sidebar-submenu, .sidebar-submenu ul {
    list-style: none;
    padding-left: 0;
}

/* Main sidebar nav-link hover - handled by ::before pseudo-element */

/* Active menu items - darker blue background */
#sidebar .nav-link.active::before {
    background-color: rgba(13, 110, 253, 0.2) !important;
}

/* Sidebar collapsible menu styles */
.sidebar-collapsible-menu {
    position: relative;
}

.sidebar-collapsible-menu .nav-link {
    cursor: pointer;
    color: #0d6efd !important;
}

/* Collapsible menu hover - handled by ::before pseudo-element */

.sidebar-collapsible-menu .sidebar-submenu {
    background: none;
    box-shadow: none;
    padding-left: 1rem;
}

/* Node Edit Modal Styles
-------------------------------------------------- */
/* Ultra-compact form styling - scoped to modal only */
#nodeEditModal .form-label {
    margin-bottom: 0 !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

/* Make form controls smaller - scoped to modal only */
#nodeEditModal .form-control,
#nodeEditModal .form-select {
    padding: 0.2rem 0.2rem !important;
    height: calc(1.5rem + 2px) !important;
    font-size: 0.8rem !important;
    min-height: unset !important;
}

/* Hide the default description textarea immediately to prevent flicker */
#nodeEditModal #div_id_sc_description textarea {
    display: none !important;
}

/* Container for ToastUI editor */
#nodeEditModal #nodeEditMarkdownEditor {
    margin-top: 0.2rem;
    min-height: 250px;
}

/* Minimize vertical spacing - scoped to modal only */
#nodeEditModal .mb-2,
#nodeEditModal .mb-3,
#nodeEditModal .my-2,
#nodeEditModal .my-3,
#nodeEditModal .form-group,
#nodeEditModal .row,
#nodeEditModal .container-fluid,
#nodeEditModal [class*="mb-"] {
    margin-bottom: 0.1rem !important;
    margin-top: 0 !important;
}

/* Zero out additional margins - scoped to modal only */
#nodeEditModal .row {
    margin-top: 0.1rem !important;
}

#nodeEditModal .form-group + .row {
    margin-top: 0.2rem !important;
}

/* Kanban Lane Collapse/Expand Styles
-------------------------------------------------- */
.kanban-column.collapsed {
    min-width: 50px !important;
    width: 50px !important;
    height: calc(100vh - 200px);
    transition: width 0.2s ease;
}

.kanban-column.collapsed .kanban-column-header,
.kanban-column.collapsed .kanban-items-container,
.kanban-column.collapsed .border-bottom {
    display: none;
}

.kanban-column.collapsed .kanban-collapsed-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0.5rem;
    height: 100%;
    background-color: #e9ecef;
}

.kanban-collapsed-header {
    display: none;
}

.kanban-collapsed-title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-weight: bold;
    font-size: 1rem;
    color: #495057;
    margin-top: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(100% - 50px);
}

.kanban-collapse-icon {
    cursor: pointer;
    color: #6c757d;
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 3px;
    transition: background-color 0.2s, color 0.2s;
}

.kanban-collapse-icon:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #495057;
}

