/* Multi-Regelwerk Sidebar Layout */

.rules-layout {
    display: flex;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Sidebar */
.rules-sidebar {
    position: sticky;
    top: 100px;
    width: 200px;
    height: fit-content;
    flex-shrink: 0;
    padding: 0;
}

.sidebar-header {
    margin-bottom: 1rem;
}

.sidebar-header h2 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Sidebar Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
}

.sidebar-link:hover {
    color: var(--text-primary);
    border-left-color: rgba(220, 38, 38, 0.5);
}

.sidebar-link.active {
    color: var(--primary-red);
    border-left-color: var(--primary-red);
    font-weight: 600;
}

.sidebar-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-text {
    font-size: 0.85rem;
}

/* Sidebar Actions */
.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-action-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.edit-btn-small {
    background: transparent;
    color: var(--primary-red);
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.edit-btn-small:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--primary-red);
}

.manage-btn-small {
    background: transparent;
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.manage-btn-small:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
}

.sidebar-action-btn svg {
    width: 16px;
    height: 16px;
}

/* Content Wrapper */
.rules-content-wrapper {
    flex: 1;
    min-width: 0;
}

/* Rules Section */
.rules-section {
    margin-bottom: 2rem;
    scroll-margin-top: 100px;
}

.rules-section:last-of-type {
    margin-bottom: 0;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .rules-layout {
        flex-direction: column;
    }

    .rules-sidebar {
        position: relative;
        top: 0;
        width: 100%;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-link {
        flex: 1;
        min-width: 150px;
        justify-content: center;
    }

    .sidebar-actions {
        flex-direction: row;
    }
}

@media (max-width: 768px) {
    .rules-layout {
        gap: 1rem;
    }

    .sidebar-nav {
        flex-direction: column;
    }

    .sidebar-link {
        min-width: auto;
        justify-content: flex-start;
    }

    .sidebar-actions {
        flex-direction: column;
    }
}
