/* heyde.schule - Modular CSS: 42_accordion_trees.css */

/* --- Accordion & Tree Styles --- */
.unit-accordion {
    margin-bottom: 10px;
}

.unit-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: all 0.2s ease;
    user-select: none;
}

.unit-header:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-1);
}

.unit-toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--accent-1);
    width: 1.5em;
    display: inline-block;
    text-align: center;
}

.unit-header.expanded .unit-toggle-icon {
    transform: rotate(90deg);
}

.unit-children {
    padding-left: 20px;
    margin-top: 5px;
    border-left: 1px dashed var(--glass-border);
    transition: all 0.3s ease;
}

.unit-children.hidden {
    display: none;
}

/* FIX: Vertical spacing in forms (Safe addition) */
.updform-field-wrapper, .addform-field-wrapper, .cpyform-row, .delform-row {
    margin-bottom: 20px !important;
}


/* Glass Bricks */
.brick-outset {
    box-shadow: 0 4px 10px rgba(0,0,0,0.3), inset 1px 1px 1px rgba(255,255,255,0.2) !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)) !important;
    border-color: rgba(255,255,255,0.2) !important;
}
.brick-inset {
    box-shadow: inset 1px 1px 5px rgba(0,0,0,0.3) !important;
    background: rgba(0, 0, 0, 0.1) !important;
    border-color: transparent !important;
}
.tree-toggle-icon {
    display: inline-block;
    width: 24px;
    text-align: center;
    transition: transform 0.2s ease;
    color: var(--accent-1);
    font-size: 0.9em;
    cursor: pointer;
}
.tree-toggle-icon.expanded {
    transform: rotate(90deg);
}
.unittype-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid var(--petrol-accent);
    margin-bottom: 12px;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.2);
}
.grade-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: bold;
    color: #fff;
    display: inline-block;
    min-width: 40px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
}
.tree-children {
    transition: all 0.3s ease;
}
.tree-children.hidden {
    display: none;
}


.badge-inset {
    padding: 2px 10px;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 5px;
    opacity: 0.85;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* --- Teacher Units View Refactoring & Generic Entity Rows --- */

.unit-row-container, .entity-row-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
}

.unit-row-actions, .entity-row-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.unit-row-preview, .entity-row-preview {
    flex-grow: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    align-self: stretch;
}

.unit-row-text-group, .entity-row-text-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}

.unit-row-title, .entity-row-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.unit-row-date, .entity-row-date {
    font-size: 0.75rem;
    white-space: nowrap;
    line-height: 1.2;
}

.unit-row-stats-badge, .entity-row-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--petrol-dark);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

.edit-form-accordion, .entity-edit-accordion {
    padding: 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 0 0 8px 8px;
    margin-top: -1px;
    border: 1px solid var(--glass-border);
    border-top: none;
}

.tree-indent-placeholder {
    width: 32px;
    display: inline-block;
}

