/**
 * Projects Portal - Collapsible Sections Styling
 */

/* Collapsible headings styling */
.collapsible-heading {
    position: relative;
    cursor: pointer;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-left: 3px solid #0073aa;
    margin: 15px 0 0 0;
    transition: background-color 0.3s ease;
}

.collapsible-heading:hover {
    background-color: #e9ecef;
}

/* Toggle icon */
.toggle-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
}

.toggle-icon:before,
.toggle-icon:after {
    content: '';
    position: absolute;
    background-color: #0073aa;
    transition: transform 0.3s ease;
}

/* Horizontal line of + and - */
.toggle-icon:before {
    width: 16px;
    height: 2px;
    top: 7px;
    left: 0;
}

/* Vertical line of + */
.toggle-icon:after {
    width: 2px;
    height: 16px;
    top: 0;
    left: 7px;
}

/* When collapsed, show + */
.collapsed .toggle-icon:after {
    transform: rotate(0);
}

/* When expanded, show - (hide the vertical part) */
.collapsible-heading:not(.collapsed) .toggle-icon:after {
    transform: rotate(90deg);
}

/* Content styling */
.collapsible-content {
    padding: 15px;
    border-left: 1px solid #dee2e6;
    margin-left: 2px;
}

/* Non-collapsible Description section styling */
.project-meta-section h4:first-child:not(.collapsible-heading) {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-left: 3px solid #0073aa;
    margin: 15px 0 0 0;
}

.project-meta-section h4:first-child:not(.collapsible-heading) + .meta-content {
    padding: 15px;
    border-left: 1px solid #dee2e6;
    margin-left: 2px;
}

/* Explicitly normalize sections flagged as non-collapsible */
.project-meta-section[data-nocollapse] h4 { cursor: default; }
.project-meta-section[data-nocollapse] .toggle-icon { display: none !important; }
.project-meta-section[data-nocollapse] .meta-content { display: block !important; }
.project-meta-section[data-nocollapse] h4.collapsible-heading { pointer-events: none; }

/* Static section class (used for Description) */
.project-meta-section-static h4 { cursor: default; }
.project-meta-section-static .toggle-icon { display: none !important; }
.project-meta-section-static .meta-content { display: block !important; border-left: none !important; margin-left: 0 !important; }
.project-meta-section-static h4.collapsible-heading { pointer-events: none; }
/* Nuke any pseudo-icon injected by other styles */
.project-meta-section-static h4::after,
.project-meta-section-static h4::before { content: none !important; }
