.folder-node rect {
    fill: rgba(255, 0, 0, 0.2) !important;
    stroke: red !important;
    stroke-width: 2;
}

.bold-text {
    font-style: normal;
    font-weight: bold;
}


.italic-text {
    font-weight: normal;
    font-style: italic;
}

.roman-text {
    font-weight: normal;
    font-style: normal;
    font-family: Times, Roman, serif;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.file-table th,
.file-table td {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.file-table th {
    background: #f8f9fa;
    text-align: left;
}

.folder {
    font-weight: bold;
    cursor: pointer;
}

.folder:hover,
.file:hover {
    background: #f1f1f1;
}

.file {
    cursor: pointer;
    color: black;
}

button {
    padding: 5px 10px;
    cursor: pointer;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
}

button:hover {
    background: #0056b3;
}

/* Ensuring child nesting is properly indented */
td {
    transition: padding-left 0.2s ease-in-out;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 50px;
    color: red;
    cursor: pointer;
}

.btn {
    height: 56px;
    border-radius: 27.5px;
    background: var(--color-green);
    box-shadow: none;
    text-transform: none;
    min-width: 110px;
    height: 40px;
    line-height: 32px;
}

.modal-custom-new {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    min-height: 100vh
}

.modal-content-custom {
    background: white;
    width: 90%;
    /* Adjust width as needed */
    height: 90%;
    /* Increase the height to occupy more space */
    max-width: 90%;
    /* Optional: limit max width */
    max-height: 90vh;
    /* Adjust for viewport height */
    position: relative;
    padding: 15px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    padding: 0px
}

.modal .modal-content-custom {
    padding: 0px;
    border-radius: 24px;
}

.white-icon {
    color: white;
}

[type="checkbox"]:not(:checked) {
    opacity: 1;
    pointer-events: all;
}

[type="checkbox"]:checked {
    pointer-events: all;
    opacity: 1;
}

.badge-custom {
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    padding-top: 2px;
    padding-bottom: 2px;
    line-height: 18px;
}

.btn-secondary {
    background-color: #6c757d;
}

.mark-buttons {
    display: inline;
    float: right;
    line-height: 40px;
}

.btn-warning {
    background: #ffc107
}

.iframe-container {
    min-height: 500px;
    max-height: 500px;
}

iframe {
    min-width: 100%;
    min-height: 500px;
}


html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.container-fluid {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#chartContainer {
    /*min-width: 1200px;*/
    /*min-height: 500px;*/
    flex: 1;
    overflow: auto;
    border: 1px solid #ddd;
    padding: 10px;
    position: relative;
}

svg {
    display: block;
    margin: 0 auto;
    /*min-width: 1200px;*/
    /*min-height: 500px;*/
}

.node circle {
    fill: #999;
    stroke-width: 3px;
    cursor: pointer;
}

.node text {
    font: 12px sans-serif;
    cursor: pointer;
}

.link {
    fill: none;
    stroke: #555;
    stroke-opacity: 0.4;
    stroke-width: 1.5px;
}

.fun {
    stroke: black;
}

.fun circle {
    fill: #ffc107;
}

.lemma {
    stroke: #4CAF50;
}

.lemma circle {
    fill: #4CAF50
}

.theorem {
    stroke: #30CDCD;
}

.theorem circle {
    fill: #30CDCD
}

#codeEditor {
    height: 200px;
    border: 1px solid #ccc;
    width: 100%;
}

.link.highlighted {
    stroke: #007bff;
    stroke-width: 4;
    stroke-opacity: 1;
}


.overlay {
    position: absolute;
    top: 70px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: width 0.3s ease-in-out, height 0.3s ease-in-out, padding 0.3s ease-in-out;
    width: 350px;
    min-height: 50px;
    overflow: hidden;
}

.legend-box {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    border: 1px solid #333;
}

.legend-line {
    display: inline-block;
    width: 40px;
    height: 2px;
    background: #999;
    margin-right: 5px;
}

ul {
    padding-left: 18px;
}

li {
    margin-bottom: 5px;
}

/* #toggleLegend {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
} */

.collapsed {
    width: 50px;
    /* Keeps it aligned instead of shrinking unpredictably */
    height: 50px;
    padding: 5px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
}

.collapsed #legendContent {
    display: none;
}

.CodeMirror {
    min-height: 600px;
}

.p-2 {
    border: 1px solid black
}

#chartContainer {
    border: 1px solid black;
    margin-bottom: 12px;
}

body {
    background: #F6F8FA
}

.breadcrumbs {
    margin-top: 16px;
    margin-bottom: 16px;
}

@media (min-width: 1400px) {
    .container {
        max-width: 98%;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 98%;
    }
}

.node.selected .base-rect {
    stroke-width: 2px;
    stroke: #007bff;
}

.node .top-overlay {
    stroke: none;
}

.node.selected .top-overlay {
    stroke: none;
    /* Ensure no middle line shows on selection */
}

.link.highlighted {
    stroke: #007bff;
    /* or any highlight color */
    stroke-width: 4;
    stroke-opacity: 1;
}

.hamburger-menu-icon {
    /* margin-top: 0px */
}

#zoomControls {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 10;
    min-width: 980px;
    flex-wrap: wrap;
}

#zoomControls button {
    background: var(--color-green);
    border: none;
    color: white;
    font-size: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

#zoomControls button:hover {
    background: #3a9428;
}

#back-btn {
    margin: 10px
}

.sidenav-trigger-right-my-uploads img {
    /* margin-top: 0px */
}

#codePanel {
    position: fixed;
    top: 0;
    right: -55%;
    width: 55%;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    resize: horizontal;
    overflow: hidden;
    border-left: 2px solid #ccc;
}


#codePanel.open {
    right: 0;
}

#codeEditor {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    border: none;
    padding: 10px;
    font-family: monospace;
}

#toggleCodeBtn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: #007bff;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}

#resizeHandle {
    width: 5px;
    cursor: ew-resize;
    background: #ccc;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 10;
}

#resizeHandle {
    width: 10px;
    cursor: ew-resize;
    background: #e0e0e0;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

#resizeHandle::before {
    content: "⋮";
    font-size: 18px;
    color: black;
    font-weight: bold;
    writing-mode: vertical-rl;
    transform: rotate(90deg);
}

.CodeMirror {
    min-height: 100%
}

.node.selected rect {
    stroke: black;
    stroke-width: 2.5px;
    stroke-dasharray: 3;
}

.pulse-glow {
    animation: pulse-glow-animation 1.5s infinite ease-in-out;
}

@keyframes pulse-glow-animation {
    0% {
        filter: url(#pulse-glow);
        opacity: 1;
    }

    50% {
        filter: url(#pulse-glow);
        opacity: 0.4;
    }

    100% {
        filter: url(#pulse-glow);
        opacity: 1;
    }
}


#outboxZone {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 8px 12px;
    background-color: #ffe69c;
    border: 2px dashed #999;
    border-radius: 8px;
    font-weight: bold;
    color: #333;
    z-index: 10;
    cursor: grab;
    transition: background-color 0.3s ease;
}

#outboxZone.active {
    background-color: var(--color-green);
    color: white;
}

.context-menu {
    position: absolute;
    display: none;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 4px 0;
    z-index: 9999;
    list-style: none;
    min-width: 180px;
}

.context-menu li {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
}

.context-menu li:hover {
    background-color: #f0f0f0;
}

#moveToParentBtn {
    overflow: hidden;
    width: 36px;
    height: 36px;
    background-color: var(--color-green);
    color: white;
    border: none;
    border-radius: 18px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;

    display: none;
    /* 👈 Hide fully, no layout space taken */
    justify-content: center;
    gap: 4px;
    padding: 0 12px;
    white-space: nowrap;
    font-size: 14px;
    transform: translateY(10px) scale(0.95);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        width 0.3s ease,
        padding 0.3s ease;

    border-radius: 12px;
}

#moveToParentBtn .label {
    display: none;
    transition: opacity 0.2s ease;
    color: white
}

#moveToParentBtn.show {
    width: auto;
    opacity: 1;
    display: flex;
    /* 👈 Fully show */
    visibility: visible;
    padding: 0 16px;
    transform: translateY(0) scale(1);
    animation: popIn 0.25s ease-out;
    border-radius: 12px;
}

#moveToParentBtn.show .label {
    display: inline;
    opacity: 1;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#moveToParentBtn.hovered {
    background-color: #45a026;
    box-shadow: 0 0 8px var(--color-green);
}

#detachOption {
    margin-bottom: 0px
}

.folder-drawer {
    position: absolute;
    top: 80px;
    left: 20px;
    width: 300px;
    max-height: 90%;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    z-index: 9;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    .search-container {
        transform: none;
        margin: 0;
        padding : 0;
        position: relative;
        left: unset;
        top : unset;
        input.custom-input {
            border-left: 0;
            border-right: 0;
            border-top: 0;
            border-radius: 0;
        }
        > i {
            position: absolute;
            right : 5px;
            top : 12px;
        }
    }
}

#folderDrawer {
    transition: max-height 0.3s ease 0.3s, min-height 0.3s ease 0.3s, width 0.3s ease;

    &.close {
        transition: max-height 0.3s ease, min-height 0.3s ease, width 0.3s ease 0.3s;
        min-height: unset;
        max-height: 58px;
        width: 140px;
        .collapseAll {
            display: none;
        }
    }
}

#folderDrawerHeader {
    background: #f1f1f1;
    padding: 8px 12px;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;

    button {
        border: 1px solid #ccc;
        &:hover {
            background: transparent;
        }
    }
}

#folderDrawerBody {
    overflow-y: auto;
    padding: 0;
    flex: 1;
    max-height: 80%;
    &.with-filter {
        .drawer-row {
            display: none;
            &.show {
                display: flex;
            }
        }
    }
}

.drawer-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    user-select: none;
    transition: background 0.2s;
    position: relative;
    padding-left: 6px;
    &:hover {
        background-color: #f1f1f1;
    }
    &:focus {
        background-color: #f1f1f1;
    }
    .toggle-button {
        display: none;
        background: transparent;
        color: black;
        border: 1px solid #ccc;
        border-radius: 100%;
        width: 27px;
        align-items: center;
        justify-content: center;
    }
    &::after {
        content: "";
        width: 6px;
        left : -4px;
        top : 50%;
        height: 1px;
        position: absolute;
        border-top: 1px dotted #ccc;
    }
    &.folder:has(+ .expanded .drawer-row) {
        .drawer-label {
            &::before {
                content: "";
                width: 1px;
                position: absolute;
                left : 9px;
                bottom: 0;
                top: 36px;
                height: 16px;
                border-left: 1px dotted #ccc;
            }
        }
    }
    &.folder:has(+ .drawer-children .drawer-row) {
        .toggle-button {
            display: flex;
        }
    }
}
.drawer-children {
    position: relative;

}


.drawer-row-container {
    margin-left: 15px;
    position: relative;
    &::before {
        content: "";
        width: 1px;
        position: absolute;
        left : -6px;
        bottom: 0;
        top: 0;
        height: 100%;
        border-left: 1px dotted #ccc;
    }
}
.drawer-children .drawer-row-container:last-child {
    &::before {
        height: 50%;
    }

}
#folderDrawerBody > .drawer-row-container  {
    margin-left: 0px;
    &::before {
        display: none;
    }
    > .drawer-children {
        &::before {
            display: none;
        }
    }
    > .drawer-row {
        &::after {
            display: none;
        }
        &::before {
            display: none;
        }
    }
} 
.drawer-row.folder:hover {
    background-color: #f1f1f1;
}

.drawer-row.selected {
    background-color: #F6F8FA;
}

.drawer-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
}

.drawer-children {
    max-height: auto;
    margin-left: 0;
    overflow: hidden;
    &.collapsed {
        height: 0px;
        padding: 0px;
    }
}

.modal {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;

    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    box-shadow: none;
    z-index: 9999;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    padding: 20px;
    box-sizing: border-box;
    margin: 0 auto
}

.drawer-row.dragging {
    opacity: 0.5;
}

.drawer-row.drop-target {
    background-color: #f1f1f1;
    border: 1px dashed #ffc107;
}

.right-click-active {
    cursor: grab;
}

.help {
    position: absolute;
    top: 0;
    right: 0;

}

.help .text {
    position: absolute;
    background: rgba(193, 193, 193, 0.3);
    padding: 25px 16px 16px;
    top: 0px;
    right: 0px;
    width: 200px;
    ;
    height: 170px;
    transition: width 0.3s ease, height 0.3s ease, border-radius 0.1s ease 0.2s, opacity 0.1s ease 0.3s;
    transform: translate(0px, 0px);
    transform-origin: 10px 10px;
}

.help.close .text {
    transition: width 0.3s ease, height 0.3s ease, border-radius 0.1s ease 0.2s;
    top: 10px;
    right: 10px;
    border-radius: 100%;
    width: 26px;
    height: 26px;
    overflow: hidden;
    padding: 0;
    /* opacity: 0; */
}

.help .text p {
    transition: all 0.3s ease 0.3s;
    opacity: 0.9;
}

.help.close .text p {
    transition: all 0.03s ease;
    height: 1px;
    width: 1px;
    opacity: 0;

}

.help .icon {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 1px solid #ccc;
    border-radius: 100%;
    background: white;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-self: unset;
    text-align: center;
}

.help .icon .fa {
    flex: 1
}

.tooltip {
    position: absolute;
    z-index: 1070;
    display: block;
    margin: 0;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    text-align: start;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    word-break: normal;
    word-spacing: normal;
    white-space: normal;
    line-break: auto;
    font-size: .875rem;
    word-wrap: break-word;
    opacity: 0;
}

.node-text {
    display: flex;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 2px;

    span {
        font-size: 12px;
        word-wrap: break-word;
        width: 100%;
        line-height: 1;
        text-align: center;
        cursor: default;
        user-select: none;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        text-shadow: 0px 0px 1px rgba(255, 255, 255, 1);

        @media (max-width: 768px) {
            font-size: 10px;
        }

    }
}

.fade {
    opacity: 0.5;
}

svg text {
    user-select: none;
    pointer-events: none;
}

.node-text span {
    cursor: pointer;
}

.node-text {
    cursor: pointer;
}

.readonly-text {
    cursor: not-allowed;
}

#atom_level_selector {
    height: 2.5rem;
    padding-inline: 5px;
    max-width: 180px;
}

#statementTypeFilterContainer label {
    display: flex;
    align-items: center;
    gap: 6px;
    align-items: center;
}

#statementTypeFilterContainer p {
    margin: 0;
    display: inline;
    position: relative;
    color: black;
    font-weight: bold
}

#statementTypeFilterContainer {
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    
    input {
        position: unset;
    }
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border:0}
  
  #current_parent use{
    opacity: 0.6;
  }
.container {
    width: 100%;
    max-width: 100%;
    min-width: 1024px;
}
@media only screen and (min-width: 1280px) {
    .container {
        width: 80%;
        max-width: 80%;
        min-width: 80%;
    }
}