/* Tocly - Frontend Styles */

.tocly {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    padding: 10px 20px;
    margin: 20px 0;
    max-width: 100%;
}

.tocly-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333;
}

.tocly-list {
    margin: 0;
    padding: 0 0 0 1.5em;
}

.tocly-list-unordered .tocly-item {
    list-style-type: disc;
}

.tocly-list-ordered {
    list-style-type: decimal;
}

.tocly-item {
    margin: 8px 0;
    line-height: 1.4;
}

.tocly-item a {
    color: #595959 !important;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 1.1rem;
}

.tocly-item a:hover {
    color: #8F48FF !important;
    text-decoration: none;
}

/* Indentation for nested heading levels */
.tocly-level-1 {
    margin-left: 0;
}

.tocly-level-2 {
    margin-left: 0;
}

.tocly-level-3 {
    margin-left: 20px;
}

.tocly-level-4 {
    margin-left: 40px;
}

.tocly-level-5 {
    margin-left: 60px;
}

.tocly-level-6 {
    margin-left: 80px;
}

.tocly-notice {
    color: #666;
    font-style: italic;
    padding: 10px;
    background: #fff;
    border-left: 3px solid #8F48FF;
}

/* Collapsible styles */
.tocly.is-collapsible .tocly-list-wrapper {
    max-height: 120px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s ease-in-out;
}

.tocly.is-collapsible .tocly-list-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, rgba(249, 249, 249, 0), rgba(249, 249, 249, 1));
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tocly.is-expanded .tocly-list-wrapper {
    max-height: 2000px;
}

.tocly.is-expanded .tocly-list-wrapper::after {
    opacity: 0;
}

.tocly-show-more {
    display: block;
    margin: 15px auto 0;
    padding: 0 10px;
    background: #595959;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.tocly-show-more:hover {
    background: #8F48FF;
}

.tocly-show-more:focus {
    outline: 2px solid #8F48FF;
    outline-offset: 2px;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Responsive design */
@media (max-width: 768px) {
    .tocly {
        padding: 15px;
    }

    .tocly-title {
        font-size: 16px;
    }

    .tocly-level-3,
    .tocly-level-4,
    .tocly-level-5,
    .tocly-level-6 {
        margin-left: 15px;
    }
	
	.tocly-item a{
		font-size: 1rem;
	}
}