.atoc-container {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    max-width: 100%;
    transition: all 0.3s ease;
}

.atoc-title {
    margin-top: 0;
    font-size: 1.25rem;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.atoc-toggle {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    margin: 0;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.atoc-toggle:hover {
    opacity: 0.8;
}

.atoc-toggle-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.atoc-toggle[aria-expanded="false"] .atoc-toggle-icon {
    transform: rotate(90deg);
}

.atoc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    transition: all 0.3s ease;
}

.atoc-item {
    margin-bottom: 8px;
    line-height: 1.4;
}

.atoc-item a {
    text-decoration: none;
    color: #444;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.atoc-item a:hover {
    text-decoration: underline;
}

.atoc-number {
    margin-right: 8px;
    font-weight: bold;
    min-width: 25px;
}

.atoc-level-1 { 
    margin-left: 0; 
    font-weight: bold; 
}

.atoc-level-2 { margin-left: 20px; }
.atoc-level-3 { margin-left: 40px; }
.atoc-level-4 { margin-left: 60px; }
.atoc-level-5 { margin-left: 80px; }
.atoc-level-6 { margin-left: 100px; }

.atoc-rtl .atoc-level-1 { 
    margin-left: 0;
    margin-right: 0;
}

.atoc-rtl .atoc-level-2 { 
    margin-left: 0; 
    margin-right: 20px; 
}

.atoc-rtl .atoc-level-3 { 
    margin-left: 0; 
    margin-right: 40px; 
}

.atoc-rtl .atoc-level-4 { 
    margin-left: 0; 
    margin-right: 60px; 
}

.atoc-rtl .atoc-level-5 { 
    margin-left: 0; 
    margin-right: 80px; 
}

.atoc-rtl .atoc-level-6 { 
    margin-left: 0; 
    margin-right: 100px; 
}

.atoc-rtl .atoc-number {
    margin-right: 0;
    margin-left: 8px;
}

.atoc-container.atoc-rtl {
    direction: rtl;
    text-align: right;
}

.atoc-sticky {
    position: sticky;
    top: 20px;
    z-index: 999;
}

/* Collapsible animation */
.atoc-list.atoc-collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.atoc-list.atoc-expanded {
    max-height: 1000px;
    opacity: 1;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .atoc-container {
        margin: 15px 0;
        padding: 15px;
    }

    .atoc-title {
        font-size: 1.1rem;
    }

    .atoc-toggle {
        font-size: 1.1rem;
    }

    .atoc-level-1 { margin-left: 0; }
    .atoc-level-2 { margin-left: 10px; }
    .atoc-level-3 { margin-left: 20px; }
    .atoc-level-4 { margin-left: 30px; }
    .atoc-level-5 { margin-left: 40px; }
    .atoc-level-6 { margin-left: 50px; }

    .atoc-rtl .atoc-level-1 { margin-right: 0; }
    .atoc-rtl .atoc-level-2 { margin-right: 10px; }
    .atoc-rtl .atoc-level-3 { margin-right: 20px; }
    .atoc-rtl .atoc-level-4 { margin-right: 30px; }
    .atoc-rtl .atoc-level-5 { margin-right: 40px; }
    .atoc-rtl .atoc-level-6 { margin-right: 50px; }
}

/* Print styles */
@media print {
    .atoc-toggle {
        display: none;
    }

    .atoc-list {
        display: block !important;
    }
}
