/* Buton Toggle */
.toc-toggle-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--global-palette-highlight);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.toc-toggle-btn:hover {
    background-color: var(--global-palette-highlight-alt);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.toc-toggle-btn:active {
    transform: scale(0.95);
}

/* Arată butonul doar pe mobil */
@media (max-width: 1024px) {
    .toc-toggle-btn {
        display: flex;
    }
}

/* Overlay */
.toc-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    z-index: 100;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.toc-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Drawer */
.toc-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background-color: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 101;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: none;
}

.toc-drawer.active {
    transform: translateX(0);
    display: flex !important;
    flex-direction: column;
}

/* Arată drawer doar pe mobil */
@media (max-width: 1024px) {
    .toc-drawer {
        display: flex;
        flex-direction: column;
    }
}

/* Header Drawer */
.toc-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
    background-color: var(--global-palette-highlight, #f5f5f5);
    flex-shrink: 0;
}

.toc-drawer-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #FFF;
}

/* Close Button */
.toc-drawer-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #FFF;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.toc-drawer-close:hover {
    color: var(--global-palette-highlight);
    transform: scale(1.2);
}

/* Drawer Content cu scrollabilitate */
.toc-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    color: #333;
}

.toc-drawer-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
}

.toc-drawer-content ul li {
    margin-bottom: 10px;
}

.toc-drawer-content ul li a {
    display: block;
    padding: 10px 15px;
    color: var(--global-text);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.toc-drawer-content ul li a:hover {
    background-color: rgba(var(--global-palette-highlight), 0.1);
    color: var(--global-palette-highlight-alt);
}