.content-section.with-regulation-panel {
    position: relative;
    /* display: flex; */
    min-height: 600px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.content-main {
    flex: 1;
    transition: all 0.3s ease;
    min-width: 0; /* Prevents flex item from overflowing */
    padding-right: 50px;
}

.content-main.regulation-expanded {
    margin-right: 400px; /* Space for expanded regulation panel */
}

.regulation-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 400px;
    background: #f8f9fa;
    border-left: 1px solid #e9ecef;
    display: flex;
    transition: transform 0.3s ease;
    transform: translateX(calc(100% - 60px));
    z-index: 10;
}

.regulation-panel.expanded {
    transform: translateX(0);
}

.regulation-handle {
    width: 60px;
    background: #2c5aa0;
    color: white;
    /* display: flex; */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    gap: 10px;
    padding: 15px;
}

.regulation-handle:hover {
    background: #1e3d6f;
}

.regulation-handle i {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.regulation-panel.expanded .regulation-handle i {
    transform: rotate(180deg);
}

.regulation-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
}

.regulation-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items:start ;
    background: #f8f9fa;
}

.regulation-header h3 {
    margin: 0;
    color: #2c5aa0;
    font-size: 1.2rem;
}

.regulation-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.regulation-section {
    margin-bottom: 25px;
}

.regulation-section h4 {
    color: #495057;
    margin-bottom: 12px;
    font-size: 1rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 5px;
}

.regulation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.regulation-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
    display: flex;
    align-items: center;
    gap: 8px;
}

.regulation-list li.compliant {
    color: #34a853;
}

.regulation-list li.non-compliant {
    color: #ea4335;
}

.regulation-list li.pending {
    color: #f9ab00;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-main.regulation-expanded {
        margin-right: 300px;
    }
    
    .regulation-panel {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .content-section.with-regulation-panel {
        flex-direction: column;
    }
    
    .content-main.regulation-expanded {
        margin-right: 0;
        margin-bottom: 300px;
    }
    
    .regulation-panel {
        width: 100%;
        height: 300px;
        transform: translateY(calc(100% - 60px));
    }
    
    .regulation-panel.expanded {
        transform: translateY(0);
    }
    
    .regulation-handle {
        width: 100%;
        height: 60px;
        writing-mode: horizontal-tb;
        flex-direction: row;
    }
}

/* Animation for smooth transitions */
.content-main, .regulation-panel {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure modals appear above regulation panel */
.modal {
    z-index: 1000;
}